Migrations folder

This commit is contained in:
Arik Fraimovich 2014-02-05 12:20:16 +02:00
parent 86a99e2337
commit 11f57b02e6
2 changed files with 14 additions and 2 deletions

View 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)

View File

@ -1,6 +1,5 @@
import json
import settings
from data.models import *
from redash import models
# first run: