redash/migrations/change_queries_description_to_nullable.py
2014-02-13 19:08:35 +02:00

12 lines
307 B
Python

from playhouse.migrate import Migrator
from redash import db
from redash import models
if __name__ == '__main__':
db.connect_db()
migrator = Migrator(db.database)
with db.database.transaction():
migrator.set_nullable(models.Query, models.Query.description, True)
db.close_db(None)