diff --git a/erpnext/patches/jan_mar_2012/convert_tables_to_utf8.py b/erpnext/patches/jan_mar_2012/convert_tables_to_utf8.py new file mode 100644 index 0000000000..1ae94a7dcd --- /dev/null +++ b/erpnext/patches/jan_mar_2012/convert_tables_to_utf8.py @@ -0,0 +1,11 @@ +import webnotes + +def execute(): + sql = webnotes.conn.sql + + sql("commit") + sql("set foreign_key_checks=0") + for tab in sql("show tables"): + sql("ALTER TABLE `%s` CONVERT TO CHARACTER SET utf8" % tab[0]) + + sql("set foreign_key_checks=1")