Loading database/05-init.sql +15 −8 Original line number Diff line number Diff line Loading @@ -23,7 +23,8 @@ select 1, 1, 'UCN', --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' 1, 1 from dual; from dual / INSERT INTO ETABLISSEMENT (ID, STRUCTURE_ID, DOMAINE, SOURCE_ID, SOURCE_CODE, EST_COMUE, EST_MEMBRE, HISTO_CREATEUR_ID, HISTO_MODIFICATEUR_ID) select Loading @@ -33,14 +34,16 @@ select 'UCN', --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' 0, 1, 1, 1 from STRUCTURE s where s.SOURCE_CODE = 'UCN'; --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' where s.SOURCE_CODE = 'UCN' --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' / -- -- Sources de données importables, ex: Apogée. -- INSERT INTO SOURCE (ID, CODE, LIBELLE, IMPORTABLE, ETABLISSEMENT_ID) SELECT 2, SOURCE_CODE||'::apogee', 'Apogée '||SOURCE_CODE, 1, ID from STRUCTURE where SOURCE_CODE = 'UCN'; --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' from STRUCTURE where SOURCE_CODE = 'UCN' --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' / -- -- Rôles par établissement. Loading Loading @@ -77,13 +80,14 @@ SELECT s.ID, 1 FROM tmp, STRUCTURE s WHERE s.SOURCE_CODE = 'UCN'; --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' WHERE s.SOURCE_CODE = 'UCN' --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' / -- -- Création de l'individu/utilisateur de test -- INSERT INTO INDIVIDU (ID, CIVILITE, NOM_USUEL, NOM_PATRONYMIQUE, PRENOM1, EMAIL, SOURCE_CODE, SOURCE_ID, HISTO_CREATEUR_ID, HISTO_MODIFICATEUR_ID, SUPANN_ID) select INDIVIDU_ID_SEQ.nextval, 'M.', 'Premier', 'Premier', 'François', 'francois.premier@univ.fr', 'INCONNU::00012345', 1, 1, 1, '00012345' from dual; select INDIVIDU_ID_SEQ.nextval, 'M.', 'Premier', 'Premier', 'François', 'francois.premier@univ.fr', 'INCONNU::00012345', 1, 1, 1, '00012345' from dual/ INSERT INTO UTILISATEUR (ID, USERNAME, EMAIL, DISPLAY_NAME, PASSWORD, INDIVIDU_ID) select UTILISATEUR_ID_SEQ.nextval, 'premierf@univ.fr', -- EPPN (si shibboleth activé) ou supannAliasLogin (si LDAP activé) Loading @@ -91,7 +95,8 @@ select UTILISATEUR_ID_SEQ.nextval, 'François PREMIER', 'shib', -- 'shib' (auth shibboleth), ou 'ldap' (auth LDAP), ou mdp bcrypté (auth locale) i.ID from INDIVIDU i where i.SOURCE_CODE = 'INCONNU::00012345'; from INDIVIDU i where i.SOURCE_CODE = 'INCONNU::00012345' / -- -- /!\ Attribution du rôle Admin tech à l'utilisateur de test !! Loading @@ -99,7 +104,8 @@ from INDIVIDU i where i.SOURCE_CODE = 'INCONNU::00012345'; INSERT INTO INDIVIDU_ROLE(ID, INDIVIDU_ID, ROLE_ID) select INDIVIDU_ROLE_ID_SEQ.nextval, i.ID, r.ID from INDIVIDU i, ROLE r where i.SOURCE_CODE = 'INCONNU::00012345' and r.SOURCE_CODE = 'ADMIN_TECH'; and r.SOURCE_CODE = 'ADMIN_TECH' / -- -- Accord des privilèges de gestion des privilèges au rôle ADMIN_TECH. Loading @@ -110,4 +116,5 @@ select r.id, p.id from role r, privilege p, CATEGORIE_PRIVILEGE cp where r.SOURCE_CODE = 'ADMIN_TECH' and cp.CODE = 'droit' -- gestion des droits and p.CATEGORIE_ID = cp.id; and p.CATEGORIE_ID = cp.id / Loading
database/05-init.sql +15 −8 Original line number Diff line number Diff line Loading @@ -23,7 +23,8 @@ select 1, 1, 'UCN', --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' 1, 1 from dual; from dual / INSERT INTO ETABLISSEMENT (ID, STRUCTURE_ID, DOMAINE, SOURCE_ID, SOURCE_CODE, EST_COMUE, EST_MEMBRE, HISTO_CREATEUR_ID, HISTO_MODIFICATEUR_ID) select Loading @@ -33,14 +34,16 @@ select 'UCN', --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' 0, 1, 1, 1 from STRUCTURE s where s.SOURCE_CODE = 'UCN'; --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' where s.SOURCE_CODE = 'UCN' --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' / -- -- Sources de données importables, ex: Apogée. -- INSERT INTO SOURCE (ID, CODE, LIBELLE, IMPORTABLE, ETABLISSEMENT_ID) SELECT 2, SOURCE_CODE||'::apogee', 'Apogée '||SOURCE_CODE, 1, ID from STRUCTURE where SOURCE_CODE = 'UCN'; --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' from STRUCTURE where SOURCE_CODE = 'UCN' --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' / -- -- Rôles par établissement. Loading Loading @@ -77,13 +80,14 @@ SELECT s.ID, 1 FROM tmp, STRUCTURE s WHERE s.SOURCE_CODE = 'UCN'; --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' WHERE s.SOURCE_CODE = 'UCN' --> à remplacer par le code choisi *entre apostrophe*, ex: 'UCN' / -- -- Création de l'individu/utilisateur de test -- INSERT INTO INDIVIDU (ID, CIVILITE, NOM_USUEL, NOM_PATRONYMIQUE, PRENOM1, EMAIL, SOURCE_CODE, SOURCE_ID, HISTO_CREATEUR_ID, HISTO_MODIFICATEUR_ID, SUPANN_ID) select INDIVIDU_ID_SEQ.nextval, 'M.', 'Premier', 'Premier', 'François', 'francois.premier@univ.fr', 'INCONNU::00012345', 1, 1, 1, '00012345' from dual; select INDIVIDU_ID_SEQ.nextval, 'M.', 'Premier', 'Premier', 'François', 'francois.premier@univ.fr', 'INCONNU::00012345', 1, 1, 1, '00012345' from dual/ INSERT INTO UTILISATEUR (ID, USERNAME, EMAIL, DISPLAY_NAME, PASSWORD, INDIVIDU_ID) select UTILISATEUR_ID_SEQ.nextval, 'premierf@univ.fr', -- EPPN (si shibboleth activé) ou supannAliasLogin (si LDAP activé) Loading @@ -91,7 +95,8 @@ select UTILISATEUR_ID_SEQ.nextval, 'François PREMIER', 'shib', -- 'shib' (auth shibboleth), ou 'ldap' (auth LDAP), ou mdp bcrypté (auth locale) i.ID from INDIVIDU i where i.SOURCE_CODE = 'INCONNU::00012345'; from INDIVIDU i where i.SOURCE_CODE = 'INCONNU::00012345' / -- -- /!\ Attribution du rôle Admin tech à l'utilisateur de test !! Loading @@ -99,7 +104,8 @@ from INDIVIDU i where i.SOURCE_CODE = 'INCONNU::00012345'; INSERT INTO INDIVIDU_ROLE(ID, INDIVIDU_ID, ROLE_ID) select INDIVIDU_ROLE_ID_SEQ.nextval, i.ID, r.ID from INDIVIDU i, ROLE r where i.SOURCE_CODE = 'INCONNU::00012345' and r.SOURCE_CODE = 'ADMIN_TECH'; and r.SOURCE_CODE = 'ADMIN_TECH' / -- -- Accord des privilèges de gestion des privilèges au rôle ADMIN_TECH. Loading @@ -110,4 +116,5 @@ select r.id, p.id from role r, privilege p, CATEGORIE_PRIVILEGE cp where r.SOURCE_CODE = 'ADMIN_TECH' and cp.CODE = 'droit' -- gestion des droits and p.CATEGORIE_ID = cp.id; and p.CATEGORIE_ID = cp.id /