Skip to content

Commit

Permalink
fix: drop old notes column from lead and prospect
Browse files Browse the repository at this point in the history
(cherry picked from commit 4b13452)
  • Loading branch information
nabinhait authored and mergify[bot] committed Sep 13, 2022
1 parent 7bb5f6e commit ded6e7f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


def execute():
for doctype in ("Lead", "Prospect"):
for doctype in ("Lead", "Prospect", "Opportunity"):
if not frappe.db.has_column(doctype, "notes"):
continue

Expand All @@ -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`")

0 comments on commit ded6e7f

Please sign in to comment.