new-grid adapt2 revision

parent ebe6b6bb
......@@ -33,7 +33,7 @@ SET
WHERE
attributes->>"$.id_cat" = 'null' AND
attributes->>"$.coord_y" > 0 AND
attributes->>'$.free_category_coord_x' = 'null';
(attributes->>'$.free_category_coord_x' = 'null' OR attributes->>'$.free_category_coord_x' IS NULL);
INSERT INTO grid (name, id, id_stu)
SELECT picto_exp.text, stu_picto.id_child_grid, stu_picto.id_stu
......@@ -71,8 +71,8 @@ WHERE id_grid IS NULL;
-- Adaptamos JSON
UPDATE stu_picto
SET
`attributes` = JSON_REPLACE(`attributes`, '$.coord_x', attributes->'$.free_category_coord_x'),
`attributes` = JSON_REPLACE(`attributes`, '$.coord_y', attributes->'$.free_category_coord_y')
`attributes` = JSON_REPLACE(`attributes`, '$.coord_x', attributes->>'$.free_category_coord_x'),
`attributes` = JSON_REPLACE(`attributes`, '$.coord_y', attributes->>'$.free_category_coord_y')
WHERE attributes->>"$.free_category_coord_x" != 'null' AND attributes->>"$.free_category_coord_y" != 'null';
-- ----------------------------------------------------------------------------
......
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