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
ca331421
authored
Jan 16, 2018
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fichero de migración corregido
parent
ad3c1a36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
sails/roles/database/files/new-grid-system-adapt.sql
sails/roles/database/files/new-grid-system-adapt.sql
View file @
ca331421
...
@@ -38,14 +38,18 @@ CREATE TABLE `message` (
...
@@ -38,14 +38,18 @@ CREATE TABLE `message` (
SELECT
"Creando tableros para los pictos con categorías..."
;
SELECT
"Creando tableros para los pictos con categorías..."
;
-- Compute max ID in grid to avoid collisions
select
@
MAX_GRID_ID
:
=
max
(
id
)
from
grid
;
-- Pictos principales: creamos escenas para cada uno de ellos, evitando los de la primera columna
-- Pictos principales: creamos escenas para cada uno de ellos, evitando los de la primera columna
UPDATE
stu_picto
UPDATE
stu_picto
SET
SET
id_child_grid
=
id
id_child_grid
=
id
+
@
MAX_GRID_ID
WHERE
WHERE
attributes
->>
"$.id_cat"
=
'null'
AND
attributes
->>
"$.id_cat"
=
'null'
AND
attributes
->>
"$.coord_y"
>
0
;
attributes
->>
"$.coord_y"
>
0
;
INSERT
INTO
grid
(
name
,
id
,
id_stu
)
INSERT
INTO
grid
(
name
,
id
,
id_stu
)
SELECT
pe
.
text
,
sp
.
id_child_grid
,
sp
.
id_stu
SELECT
pe
.
text
,
sp
.
id_child_grid
,
sp
.
id_stu
FROM
stu_picto
sp
JOIN
picto_exp
pe
ON
FROM
stu_picto
sp
JOIN
picto_exp
pe
ON
...
...
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