redash/old_migrations/0016_add_alert_subscriber.py
Arik Fraimovich 70d545410d Add Flask-Migrate to the project
Also moved old migrations to old_migrations folder (before deleting them entirely).
2016-12-07 17:59:01 +02:00

10 lines
349 B
Python

from redash.models import db, Alert, AlertSubscription
if __name__ == '__main__':
with db.database.transaction():
# There was an AWS/GCE image created without this table, to make sure this exists we run this migration.
if not AlertSubscription.table_exists():
AlertSubscription.create_table()
db.close_db(None)