fix: drop old notes column from lead and prospect
This commit is contained in:
parent
2a100abef1
commit
4b13452022
@ -3,7 +3,7 @@ from frappe.utils import cstr, strip_html
|
||||
|
||||
|
||||
def execute():
|
||||
for doctype in ("Lead", "Prospect"):
|
||||
for doctype in ("Lead", "Prospect", "Opportunity"):
|
||||
if not frappe.db.has_column(doctype, "notes"):
|
||||
continue
|
||||
|
||||
@ -19,3 +19,5 @@ def execute():
|
||||
doc = frappe.get_doc(doctype, d.name)
|
||||
doc.append("notes", {"note": d.notes, "added_by": d.modified_by, "added_on": d.modified})
|
||||
doc.update_child_table("notes")
|
||||
|
||||
frappe.db.sql_ddl(f"alter table `tab{doctype}` drop column `notes`")
|
||||
|
Loading…
x
Reference in New Issue
Block a user