11 lines
594 B
SQL
11 lines
594 B
SQL
CREATE TABLE IF NOT EXISTS `exercise_tree_parents` (
|
|
`exercise_tree_parents_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
`exercise_tree_parent_id` int(11) NOT NULL DEFAULT 0,
|
|
`exercise_tree_child_id` int(11) NOT NULL DEFAULT 0,
|
|
PRIMARY KEY (`exercise_tree_parents_id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci;
|
|
|
|
INSERT INTO exercise_tree_parents (exercise_tree_parent_id, exercise_tree_child_id)
|
|
SELECT parent_id, tree_id FROM exercise_tree;
|
|
|
|
UPDATE configuration set config_value = "1.0.18", date_change=CURRENT_DATE WHERE config_key = "db_version"; |