Anand Doshi | 486f9df | 2012-07-19 13:40:31 +0530 | [diff] [blame] | 1 | from __future__ import unicode_literals |
Rushabh Mehta | 2d7cb22 | 2012-07-13 15:07:07 +0530 | [diff] [blame] | 2 | import webnotes |
| 3 | def execute(): |
| 4 | webnotes.conn.commit() |
| 5 | |
| 6 | from webnotes.install_lib.install import Installer |
| 7 | Installer(None, None).create_auth_table() |
| 8 | |
| 9 | webnotes.conn.begin() |
| 10 | |
| 11 | for user, password in webnotes.conn.sql("""select name, password from tabProfile"""): |
Rushabh Mehta | 49dc5da | 2012-08-03 16:02:24 +0530 | [diff] [blame] | 12 | if password: |
| 13 | webnotes.conn.sql("""insert into __Auth (user, `password`) values (%s, %s)""", |
| 14 | (user, password)) |