1UP_SQL = """ 2ALTER TABLE `planner_tests` RENAME TO `planner_test_configs`; 3 4ALTER TABLE `planner_test_jobs` DROP FOREIGN KEY `test_jobs_test_id_fk`; 5ALTER TABLE `planner_test_jobs` DROP KEY `planner_test_jobs_test_id`; 6 7ALTER TABLE `planner_test_jobs` CHANGE COLUMN 8`test_id` `test_config_id` INT NOT NULL; 9 10ALTER TABLE `planner_test_jobs` ADD CONSTRAINT `test_jobs_test_config_id_fk` 11FOREIGN KEY `planner_test_jobs_test_config_id` 12(`test_config_id`) REFERENCES `planner_test_configs` (`id`); 13""" 14 15DOWN_SQL = """ 16ALTER TABLE `planner_test_configs` RENAME TO `planner_tests`; 17 18ALTER TABLE `planner_test_jobs` DROP FOREIGN KEY `test_jobs_test_config_id_fk`; 19ALTER TABLE `planner_test_jobs` DROP KEY `planner_test_jobs_test_config_id`; 20 21ALTER TABLE `planner_test_jobs` CHANGE COLUMN 22`test_config_id` `test_id` INT NOT NULL; 23 24ALTER TABLE `planner_test_jobs` ADD CONSTRAINT `test_jobs_test_id_fk` 25FOREIGN KEY `planner_test_jobs_test_id` 26(`test_id`) REFERENCES `planner_tests` (`id`); 27""" 28