[fix] number of backups

This commit is contained in:
Rushabh Mehta 2016-09-21 11:18:16 +05:30
parent 12422e75b0
commit e8e9aef91b
3 changed files with 18 additions and 2 deletions

View file

@ -0,0 +1 @@
- Restrict the number of backups to be saved in System Settings

View file

@ -238,6 +238,20 @@ def reload_doc(context, module, doctype, docname):
finally:
frappe.destroy()
@click.command('reload-doctype')
@click.argument('doctype')
@pass_context
def reload_doctype(context, doctype):
"Reload schema for a DocType"
for site in context.sites:
try:
frappe.init(site=site)
frappe.connect()
frappe.reload_doctype(doctype, force=context.force)
frappe.db.commit()
finally:
frappe.destroy()
@click.command('use')
@click.argument('site')
@ -455,6 +469,7 @@ commands = [
new_site,
reinstall,
reload_doc,
reload_doctype,
remove_from_installed_apps,
restore,
run_patch,

View file

@ -324,7 +324,7 @@
"collapsible": 0,
"columns": 0,
"default": "3",
"description": "Limit the number of backups. Older backups will be automatically deleted",
"description": "Older backups will be automatically deleted",
"fieldname": "backup_limit",
"fieldtype": "Int",
"hidden": 0,
@ -700,7 +700,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2016-08-23 15:12:00.582281",
"modified": "2016-08-23 15:12:00.582283",
"modified_by": "Administrator",
"module": "Core",
"name": "System Settings",