Home | History | Annotate | Download | only in migrations
      1 UP_SQL = """
      2 ALTER TABLE users ADD COLUMN `reboot_before` smallint NOT NULL;
      3 ALTER TABLE users ADD COLUMN `reboot_after` smallint NOT NULL;
      4 UPDATE users SET reboot_before=1, reboot_after=2;
      5 """
      6 
      7 
      8 DOWN_SQL = """
      9 ALTER TABLE users DROP COLUMN reboot_before;
     10 ALTER TABLE users DROP COLUMN reboot_after;
     11 """
     12 
     13 
     14 def migrate_up(manager):
     15     manager.execute_script(UP_SQL)
     16 
     17 
     18 def migrate_down(manager):
     19     manager.execute_script(DOWN_SQL)
     20