mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
[patch] [fiel data] new patch p07_update_file_data_2
This commit is contained in:
15
patches/april_2013/p07_update_file_data_2.py
Normal file
15
patches/april_2013/p07_update_file_data_2.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import webnotes
|
||||
def execute():
|
||||
from patches.april_2013.p05_update_file_data import update_file_list, get_single_doctypes
|
||||
|
||||
singles = get_single_doctypes()
|
||||
for doctype in webnotes.conn.sql_list("""select table_name from `information_schema`.`columns`
|
||||
where table_schema=%s and column_name='file_list'""", webnotes.conn.cur_db_name):
|
||||
doctype = doctype[3:]
|
||||
update_file_list(doctype, singles)
|
||||
|
||||
webnotes.conn.sql("""delete from `tabCustom Field` where fieldname='file_list'
|
||||
and parent=%s""", doctype)
|
||||
webnotes.conn.sql("""delete from `tabDocField` where fieldname='file_list'
|
||||
and parent=%s""", doctype)
|
||||
|
||||
Reference in New Issue
Block a user