new-grid adapt2 revision

parent 9ad60b8d
...@@ -32,8 +32,7 @@ SET ...@@ -32,8 +32,7 @@ SET
id_child_grid = id id_child_grid = id
WHERE WHERE
attributes->>"$.id_cat" = 'null' AND attributes->>"$.id_cat" = 'null' AND
attributes->>"$.coord_y" > 0 AND attributes->>"$.coord_y" > 0;
(attributes->>'$.free_category_coord_x' = 'null' OR attributes->>'$.free_category_coord_x' IS NULL);
INSERT INTO grid (name, id, id_stu) INSERT INTO grid (name, id, id_stu)
SELECT picto_exp.text, stu_picto.id_child_grid, stu_picto.id_stu SELECT picto_exp.text, stu_picto.id_child_grid, stu_picto.id_stu
...@@ -55,7 +54,9 @@ UPDATE stu_picto AS A ...@@ -55,7 +54,9 @@ UPDATE stu_picto AS A
JOIN stu_picto AS B on JOIN stu_picto AS B on
A.id_scene = B.id_scene AND A.id_scene = B.id_scene AND
A.id_stu = B.id_stu AND A.id_stu = B.id_stu AND
A.attributes->>"$.id_cat" = B.id_pic A.attributes->>"$.id_cat" = B.id_pic AND
B.attributes->>"$.id_cat" = 'null' AND
B.attributes->>"$.coord_y" > 0
SET A.id_grid = B.id_child_grid; SET A.id_grid = B.id_child_grid;
-- ---------------------------------------------------------------------------- -- ----------------------------------------------------------------------------
......
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