[Fix] Corrected the patch to check '_liked_by' column before altering the table
This commit is contained in:
parent
d3cf84319f
commit
85db6a5a6b
1 changed files with 1 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ def execute():
|
|||
|
||||
for table in frappe.db.get_tables():
|
||||
columns = [r[0] for r in frappe.db.sql("DESC `{0}`".format(table))]
|
||||
if "_starred_by" in columns:
|
||||
if "_starred_by" in columns and '_liked_by' not in columns:
|
||||
frappe.db.sql_ddl("""alter table `{0}` change `_starred_by` `_liked_by` Text """.format(table))
|
||||
|
||||
if not frappe.db.has_column("Communication", "_liked_by"):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue