From 2d7cb22f1f52263d922454a2ce9e35b9049075bf Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 13 Jul 2012 15:07:07 +0530 Subject: [PATCH] added auth_table patch file: --- erpnext/patches/july_2012/auth_table.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 erpnext/patches/july_2012/auth_table.py diff --git a/erpnext/patches/july_2012/auth_table.py b/erpnext/patches/july_2012/auth_table.py new file mode 100644 index 0000000000..db08741441 --- /dev/null +++ b/erpnext/patches/july_2012/auth_table.py @@ -0,0 +1,12 @@ +import webnotes +def execute(): + webnotes.conn.commit() + + from webnotes.install_lib.install import Installer + Installer(None, None).create_auth_table() + + webnotes.conn.begin() + + for user, password in webnotes.conn.sql("""select name, password from tabProfile"""): + webnotes.conn.sql("""insert into __Auth (user, `password`) values (%s, %s)""", + (user, password))