brotherton-erpnext/erpnext/patches/v9_2/remove_company_from_patient.py

7 lines
197 B
Python

import frappe
def execute():
if frappe.db.exists("DocType", "Patient"):
if 'company' in frappe.db.get_table_columns("Patient"):
frappe.db.sql("alter table `tabPatient` drop column company")