Files
Android11/external/autotest/frontend/migrations/021_add_user_reboot_prefs.py
2023-10-13 14:01:41 +00:00

20 lines
432 B
Python

UP_SQL = """
ALTER TABLE users ADD COLUMN `reboot_before` smallint NOT NULL;
ALTER TABLE users ADD COLUMN `reboot_after` smallint NOT NULL;
UPDATE users SET reboot_before=1, reboot_after=2;
"""
DOWN_SQL = """
ALTER TABLE users DROP COLUMN reboot_before;
ALTER TABLE users DROP COLUMN reboot_after;
"""
def migrate_up(manager):
manager.execute_script(UP_SQL)
def migrate_down(manager):
manager.execute_script(DOWN_SQL)