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
2116758c
authored
Nov 08, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
new-grid adapt2 revision
parent
a63e0e9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
sails/roles/database/files/new-grid-system-adapt2.sql
sails/roles/database/files/new-grid-system-adapt2.sql
View file @
2116758c
...
@@ -28,11 +28,12 @@ SELECT "Creando tableros para los pictos con categorías...";
...
@@ -28,11 +28,12 @@ SELECT "Creando tableros para los pictos con categorías...";
-- 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
id_child_grid
=
id
SET
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
AND
attributes
->
'$.free_category_coord_x'
=
'null'
;
attributes
->
>
'$.free_category_coord_x'
=
'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
...
@@ -44,21 +45,20 @@ WHERE
...
@@ -44,21 +45,20 @@ WHERE
-- Pictos hijos: los asociamos a su escena correspondiente
-- Pictos hijos: los asociamos a su escena correspondiente
SELECT
"Asociando pictos a tableros..."
;
SELECT
"Asociando pictos
bajo categorías
a tableros..."
;
UPDATE
stu_picto
AS
A
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
SET
A
.
id_grid
=
B
.
id_child_grid
SET
A
.
id_grid
=
B
.
id_child_grid
;
WHERE
B
.
id_child_grid
IS
NOT
NULL
;
-
-
----------------------------------------------------------------------------
-
----------------------------------------------------------------------------
-- ESCENAS SIN CATEGORIAS
-- ESCENAS SIN CATEGORIAS
-- ----------------------------------------------------------------------------
-- ----------------------------------------------------------------------------
SELECT
"
Transformando escenas sin categorías en tableros...
"
;
SELECT
"
Asociamos pictos que no están bajo categorías (los de primer nivel o libres) a tableros
"
;
UPDATE
stu_picto
UPDATE
stu_picto
SET
id_grid
=
id_scene
SET
id_grid
=
id_scene
...
...
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