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