Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9ad60b8d
authored
Nov 08, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
new-grid adapt2 revision
parent
ebe6b6bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
sails/roles/database/files/new-grid-system-adapt2.sql
sails/roles/database/files/new-grid-system-adapt2.sql
View file @
9ad60b8d
...
...
@@ -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'
;
-- ----------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment