new-grid adapt2 revision

parent e780a1fa
......@@ -12,7 +12,7 @@ SELECT "Actualizando esquema";
RENAME TABLE `scene` TO `grid`;
ALTER TABLE `student` CHANGE `id_active_scene` `id_active_grid` int(11) NULL;
ALTER TABLE `stu_picto` ADD `id_grid` int(11) NOT NULL;
ALTER TABLE `stu_picto` ADD `id_grid` int(11) NULL;
ALTER TABLE `stu_picto` ADD `id_child_grid` int(11) NULL;
ALTER TABLE `stu_picto` ADD FOREIGN KEY(`id_child_grid`) REFERENCES `grid`(`id`) ON DELETE SET NULL;
ALTER TABLE `stu_picto` ADD FOREIGN KEY(`id_grid`) REFERENCES `grid`(`id`) ON DELETE CASCADE;
......@@ -82,6 +82,7 @@ WHERE attributes->>"$.free_category_coord_x" != 'null' AND attributes->>"$.free_
SELECT "Cambios finales en el esquema y purga del JSON de stu_picto";
ALTER TABLE `stu_picto` DROP COLUMN `id_scene`;
ALTER TABLE `stu_picto` CHANGE `id_grid` `id_grid` int(11) NOT NULL;
UPDATE stu_picto
SET
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment