blob: 718243d6de22d2b4d17c73f9273d7c4e1b99a18e [file] [log] [blame]
Rushabh Mehtae67d1fb2013-08-05 14:59:54 +05301# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
2# License: GNU General Public License v3. See license.txt
3
Anand Doshi486f9df2012-07-19 13:40:31 +05304from __future__ import unicode_literals
Rushabh Mehta2d7cb222012-07-13 15:07:07 +05305import webnotes
6def execute():
7 webnotes.conn.commit()
8
9 from webnotes.install_lib.install import Installer
10 Installer(None, None).create_auth_table()
11
12 webnotes.conn.begin()
13
14 for user, password in webnotes.conn.sql("""select name, password from tabProfile"""):
Rushabh Mehta49dc5da2012-08-03 16:02:24 +053015 if password:
16 webnotes.conn.sql("""insert into __Auth (user, `password`) values (%s, %s)""",
17 (user, password))