Merge pull request #135 from EverythingMe/feature_roles

Fix: create table only if it doesn't exists.
This commit is contained in:
Arik Fraimovich 2014-03-12 13:35:14 +02:00
commit 67e4d24c11

View File

@ -322,7 +322,7 @@ def create_db(create_tables, drop_tables):
db.database.execute_sql('DROP TABLE %s CASCADE' % model._meta.db_table)
#model.drop_table()
if create_tables:
if create_tables and not model.table_exists():
model.create_table()
db.close_db(None)