mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
16 lines
380 B
Python
16 lines
380 B
Python
from playhouse.migrate import PostgresqlMigrator, migrate
|
|
|
|
from redash.models import db
|
|
from redash import models
|
|
|
|
if __name__ == '__main__':
|
|
db.connect_db()
|
|
migrator = PostgresqlMigrator(db.database)
|
|
|
|
with db.database.transaction():
|
|
migrate(
|
|
migrator.add_column('queries', 'is_archived', models.Query.is_archived)
|
|
)
|
|
|
|
db.close_db(None)
|