refactored patches, bug fix for assign_to
This commit is contained in:
parent
479670e4e1
commit
6147451da3
33
erpnext/patches/jan_mar_2012/latest/cleanups.py
Normal file
33
erpnext/patches/jan_mar_2012/latest/cleanups.py
Normal file
@ -0,0 +1,33 @@
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
from webnotes.model import delete_doc
|
||||
delete_doc("DocType", "SSO Control")
|
||||
delete_doc("DocType", "WN ERP Client Control")
|
||||
delete_doc("DocType", "Production Tips Common")
|
||||
delete_doc("DocType", "DocTrigger")
|
||||
delete_doc("Page", "Setup Wizard")
|
||||
|
||||
# cleanup control panel
|
||||
delete_doc("DocType", "Control Panel")
|
||||
reload_doc("core", "doctype", "control_panel")
|
||||
|
||||
# cleanup page
|
||||
delete_doc("DocType", "Page")
|
||||
reload_doc("core", "doctype", "page")
|
||||
|
||||
webnotes.conn.sql("""delete from tabSingles
|
||||
where field like 'startup_%' and doctype='Control Panel'""")
|
||||
|
||||
webnotes.conn.commit()
|
||||
|
||||
# DDLs
|
||||
# -------------------
|
||||
|
||||
webnotes.conn.sql("drop table if exists tabDocTrigger")
|
||||
|
||||
try: webnotes.conn.sql("""alter table `tabFile Data` drop column blob_content""")
|
||||
except: pass
|
||||
|
||||
webnotes.conn.sql("""alter table __PatchLog engine=InnoDB""")
|
||||
|
@ -5,28 +5,7 @@ from webnotes.modules import reload_doc
|
||||
def execute():
|
||||
add_default_home_page()
|
||||
reload_doc('setup','doctype','manage_account')
|
||||
webnotes.conn.commit()
|
||||
webnotes.conn.sql("drop table if exists tabDocTrigger")
|
||||
cleanup()
|
||||
|
||||
def cleanup():
|
||||
webnotes.conn.begin()
|
||||
from webnotes.model import delete_doc
|
||||
delete_doc("DocType", "SSO Control")
|
||||
delete_doc("DocType", "WN ERP Client Control")
|
||||
delete_doc("DocType", "Production Tips Common")
|
||||
delete_doc("DocType", "DocTrigger")
|
||||
|
||||
# cleanup control panel
|
||||
delete_doc("DocType", "Control Panel")
|
||||
reload_doc("core", "doctype", "control_panel")
|
||||
|
||||
# cleanup page
|
||||
delete_doc("DocType", "Page")
|
||||
reload_doc("core", "doctype", "page")
|
||||
|
||||
webnotes.conn.sql("""delete from tabSingles
|
||||
where field like 'startup_%' and doctype='Control Panel'""")
|
||||
|
||||
def add_default_home_page():
|
||||
if not webnotes.conn.sql("""select name from `tabDefault Home Page`
|
||||
|
@ -5,8 +5,6 @@ from webnotes.model.doc import Document
|
||||
|
||||
def execute():
|
||||
add_website_manager()
|
||||
cleanup_file_data()
|
||||
update_patch_log()
|
||||
from webnotes.modules import reload_doc
|
||||
from webnotes.model import delete_doc
|
||||
|
||||
@ -50,16 +48,3 @@ def add_website_manager():
|
||||
d.parent = i[0]
|
||||
d.role = 'Website Manager'
|
||||
d.save(1)
|
||||
|
||||
def cleanup_file_data():
|
||||
webnotes.conn.commit()
|
||||
try:
|
||||
webnotes.conn.sql("""alter table `tabFile Data` drop column blob_content""")
|
||||
except:
|
||||
pass
|
||||
webnotes.conn.begin()
|
||||
|
||||
def update_patch_log():
|
||||
webnotes.conn.commit()
|
||||
webnotes.conn.sql("""alter table __PatchLog engine=InnoDB""")
|
||||
webnotes.conn.begin()
|
||||
|
@ -1 +1 @@
|
||||
357
|
||||
358
|
Loading…
Reference in New Issue
Block a user