mirror of
https://github.com/valitydev/redash.git
synced 2024-11-06 17:15:17 +00:00
Migrations folder
This commit is contained in:
parent
86a99e2337
commit
11f57b02e6
13
migrations/add_created_at_field.py
Normal file
13
migrations/add_created_at_field.py
Normal file
@ -0,0 +1,13 @@
|
||||
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.add_column(models.Dashboard, models.Dashboard.created_at, 'created_at')
|
||||
migrator.add_column(models.Widget, models.Widget.created_at, 'created_at')
|
||||
|
||||
db.close_db(None)
|
@ -1,6 +1,5 @@
|
||||
import json
|
||||
import settings
|
||||
from data.models import *
|
||||
from redash import models
|
||||
|
||||
# first run:
|
||||
|
Loading…
Reference in New Issue
Block a user