init db fix
This commit is contained in:
parent
1a08aade00
commit
694f1c2b5e
|
@ -52,6 +52,13 @@ def init_db(dbname):
|
|||
if not tbl in rdb.table_list().run(db):
|
||||
rdb.table_create(tbl).run(db)
|
||||
|
||||
if not 'name' in rdb.table('users').index_list().run(db):
|
||||
rdb.table('sites').indexCreate('name').run(db)
|
||||
|
||||
for i in ['username', 'email']:
|
||||
if not i in rdb.table('users').index_list().run(db):
|
||||
rdb.table('users').indexCreate(i).run(db)
|
||||
|
||||
s = Site()
|
||||
if not s.get_by_name('_'):
|
||||
s.create(name='_', repo='_')
|
||||
|
|
Loading…
Reference in a new issue