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
d344b8fb
authored
Oct 18, 2016
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Added data for Centro Destrezas
parent
d347a1d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
97 additions
and
0 deletions
sails/roles/database/files/test-centrodestrezas.sql
sails/roles/database/files/test-centrodestrezas.sql
0 → 100644
View file @
d344b8fb
INSERT
IGNORE
INTO
`office`
(
`name`
,
`address`
,
`country`
,
`contact_person`
,
`email`
,
`phone1`
,
`lang`
)
VALUES
(
'Centro Destrezas'
,
'Avd. Eduardo García Maroto, 22, 1º Centro - Jaén'
,
'ES'
,
'Centro Destrezas'
,
'centrodestrezas@gmail.com'
,
'+34 953 043 508'
,
'es-es'
);
INSERT
IGNORE
INTO
`supervisor`
(
`name`
,
`surname`
,
`gender`
,
`address`
,
`email`
,
`phone`
,
`lang`
,
`password`
,
`active`
,
`id_off`
,
`pic`
)
VALUES
(
'Centro'
,
'Destrezas'
,
'F'
,
'Avd. Eduardo García Maroto, 22, 1º Centro - Jaén'
,
'centrodestrezas@gmail.com'
,
'+34 953 043 508'
,
'es-es'
,
'$2a$06$bLATDztqq8tufilBXK/Y7OxaiFGQ8fFDo5kZ7nQKIuEXW7HVTvwMS'
,
true
,
(
SELECT
id
from
office
where
email
=
'centrodestrezas@gmail.com'
),
'defaultAvatar.jpg'
);
UPDATE
office
SET
admin
=
(
SELECT
id
FROM
supervisor
WHERE
email
=
'centrodestrezas@gmail.com'
)
WHERE
email
=
'centrodestrezas@gmail.com'
;
INSERT
IGNORE
INTO
`student`
(
`username`
,
`password`
,
`name`
,
`surname`
,
`birthdate`
,
`gender`
,
`country`
,
`pic`
,
`notes`
,
`lang`
,
`id_off`
,
`attributes`
)
VALUES
(
'alumno1centrodestrezas'
,
'$2a$10$wux/TGja3DN0LQUb4RhrHuV9UIGg0xzfyjorhIqOvhvqVz/qKP3Du'
,
'Alumno1'
,
'Centro Destrezas'
,
'2008-02-07'
,
'M'
,
'ES'
,
'defaultAvatar.jpg'
,
NULL
,
'es-es'
,
(
SELECT
id
from
office
WHERE
email
=
'centrodestrezas@gmail.com'
),
'{"stu-att":[{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}]}'
)
INSERT
IGNORE
INTO
`stu_picto`
(
`id_stu`
,
`id_pic`
,
`attributes`
)
SELECT
S
.
id
,
P
.
id_pic
,
concat
(
'{'
,
'"id_cat":'
,
if
(
P
.
id_cat_pic
is
null
,
'null'
,
P
.
id_cat_pic
),
',"coord_x":'
,
P
.
coord_x
,
',"coord_y":'
,
P
.
coord_y
,
',"status":"invisible"'
,
',"highlight":false'
,
',"color":'
,
if
(
P
.
color
is
null
,
'null'
,
concat
(
'"'
,
P
.
color
,
'"'
)),
'}'
)
as
attributes
FROM
student
S
,
picto_core
P
WHERE
S
.
id_off
=
(
SELECT
id
FROM
office
WHERE
email
=
'centrodestrezas@gmail.com'
)
;
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