from playhouse.migrate import Migrator
from redash.models import db
from redash import models

if __name__ == '__main__':
    db.connect_db()
    migrator = Migrator(db.database)
    
    with db.database.transaction():
        migrator.add_column(models.Query, models.Query.is_archived, 'is_archived')

    db.close_db(None)

@@ -1,12 +1,21 @@
+try:%0A    
 from playhou
@@ -41,16 +41,102 @@
 igrator%0A
+except ImportError:%0A    from playhouse.migrate import PostgresqlMigrator as Migrator%0A%0A
 from red
@@ -267,20 +267,16 @@
 tabase)%0A
-    
 %0A    wit

make migration work with new peewee