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