2015-03-09 14:55:55 +00:00
|
|
|
from playhouse.migrate import PostgresqlMigrator, migrate
|
2015-03-08 11:28:18 +00:00
|
|
|
|
2014-09-25 14:42:33 +00:00
|
|
|
from redash.models import db
|
2014-05-09 17:14:30 +00:00
|
|
|
from redash import models
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
db.connect_db()
|
2015-03-09 14:55:55 +00:00
|
|
|
migrator = PostgresqlMigrator(db.database)
|
2015-03-08 11:28:18 +00:00
|
|
|
|
2014-05-09 17:14:30 +00:00
|
|
|
with db.database.transaction():
|
2015-03-09 14:55:55 +00:00
|
|
|
migrate(
|
|
|
|
migrator.add_column('queries', 'is_archived', models.Query.is_archived)
|
|
|
|
)
|
2014-05-09 17:14:30 +00:00
|
|
|
|
|
|
|
db.close_db(None)
|