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

8 lines
237 B
Python

from __future__ import unicode_literals
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")