mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 17:38:54 +00:00
Create table only if it doesn't exists
This commit is contained in:
parent
ae3151d3a7
commit
2d995d0935
@ -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)
|
Loading…
Reference in New Issue
Block a user