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