mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
70d545410d
Also moved old migrations to old_migrations folder (before deleting them entirely).
13 lines
303 B
Python
13 lines
303 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_not_null('events', 'user_id')
|
|
)
|