redash/migrations/0016_drop_tables_from_group.py

15 lines
323 B
Python

from playhouse.migrate import PostgresqlMigrator, migrate
from redash.models import db
if __name__ == '__main__':
db.connect_db()
migrator = PostgresqlMigrator(db.database)
with db.database.transaction():
migrate(
migrator.drop_column('groups', 'tables')
)
db.close_db(None)