diff --git a/erpnext/patches/v8_10/add_due_date_to_gle.py b/erpnext/patches/v8_10/add_due_date_to_gle.py index 2a088bd218..047c883f0f 100644 --- a/erpnext/patches/v8_10/add_due_date_to_gle.py +++ b/erpnext/patches/v8_10/add_due_date_to_gle.py @@ -3,4 +3,5 @@ import frappe def execute(): - frappe.db.sql("ALTER TABLE `tabGL Entry` ADD COLUMN `due_date` DATE DEFAULT NULL") + if not frappe.db.has_column("GL Entry", "due_date"): + frappe.db.sql("ALTER TABLE `tabGL Entry` ADD COLUMN `due_date` DATE DEFAULT NULL")