redash/migrations/0016_add_alert_subscriber.py
2015-12-03 11:03:38 +02:00

11 lines
350 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)