1 |
-- Base de donnees: "openmairie" |
-- Base de donnees framework om5 "openmairie" |
2 |
|
|
3 |
-- tables openmairie -- |
-- schema |
4 |
-- rajout de om_tdb, om_widget et om_sig_point |
-- SET search_path = openfoncier, pg_catalog; |
|
-- SPECIFIC : om_utilisateur instructeur |
|
5 |
|
|
|
-- coll |
|
6 |
|
|
7 |
CREATE TABLE om_collectivite ( |
CREATE TABLE om_collectivite ( |
8 |
om_collectivite int8 NOT NULL, |
om_collectivite int8 NOT NULL, |
46 |
om_profil varchar(2) NOT NULL default '', |
om_profil varchar(2) NOT NULL default '', |
47 |
om_collectivite int8 NOT NULL, |
om_collectivite int8 NOT NULL, |
48 |
om_type varchar(20) NOT NULL, |
om_type varchar(20) NOT NULL, |
|
instructeur varchar(3), |
|
|
telephone character varying(14), |
|
49 |
PRIMARY KEY (om_utilisateur) |
PRIMARY KEY (om_utilisateur) |
50 |
); |
); |
51 |
|
|
263 |
ALTER TABLE ONLY om_tdb |
ALTER TABLE ONLY om_tdb |
264 |
ADD CONSTRAINT om_tdb_om_widget_fkey FOREIGN KEY (om_widget) REFERENCES om_widget(om_widget); |
ADD CONSTRAINT om_tdb_om_widget_fkey FOREIGN KEY (om_widget) REFERENCES om_widget(om_widget); |
265 |
|
|
266 |
-- sequences |
-- sequences et initialisation -- |
267 |
|
|
268 |
CREATE SEQUENCE om_collectivite_seq |
CREATE SEQUENCE om_collectivite_seq |
269 |
INCREMENT 1 |
INCREMENT 1 |
297 |
INCREMENT 1 |
INCREMENT 1 |
298 |
MINVALUE 1 |
MINVALUE 1 |
299 |
MAXVALUE 9223372036854775807 |
MAXVALUE 9223372036854775807 |
300 |
START 3 |
START 2 |
301 |
CACHE 1; |
CACHE 1; |
302 |
|
|
303 |
CREATE SEQUENCE om_lettretype_seq |
CREATE SEQUENCE om_lettretype_seq |
311 |
INCREMENT 1 |
INCREMENT 1 |
312 |
MINVALUE 1 |
MINVALUE 1 |
313 |
MAXVALUE 9223372036854775807 |
MAXVALUE 9223372036854775807 |
314 |
START 3 |
START 1 |
315 |
CACHE 1; |
CACHE 1; |
316 |
|
|
317 |
CREATE SEQUENCE om_widget_seq |
CREATE SEQUENCE om_widget_seq |
325 |
INCREMENT 1 |
INCREMENT 1 |
326 |
MINVALUE 1 |
MINVALUE 1 |
327 |
MAXVALUE 9223372036854775807 |
MAXVALUE 9223372036854775807 |
328 |
START 3 |
START 1 |
329 |
CACHE 1; |
CACHE 1; |
330 |
|
|
331 |
|
|
332 |
-- data -- |
-- data de base |
333 |
|
|
334 |
-- coll |
-- coll |
335 |
INSERT INTO om_collectivite (om_collectivite, libelle, niveau) VALUES |
INSERT INTO om_collectivite (om_collectivite, libelle, niveau) VALUES |
336 |
(1, 'ARLES', '2'); |
(1, 'ARLES', '2'); |
337 |
INSERT INTO om_parametre (om_parametre, libelle, valeur, om_collectivite) VALUES |
INSERT INTO om_parametre (om_parametre, libelle, valeur, om_collectivite) VALUES |
338 |
(1, 'maire', 'O PENMAIRIE', 1), |
(1, 'maire', 'O PENMAIRIE', 1), |
339 |
(2, 'ville', 'Ville d''ARLES', 1); |
(2, 'ville', 'Libreville', 1); |
340 |
|
|
341 |
-- droit |
-- droit |
342 |
|
|
343 |
|
INSERT INTO om_profil VALUES (99, 'NON UTILISE'); |
344 |
INSERT INTO om_profil VALUES (5, 'ADMINISTRATEUR'); |
INSERT INTO om_profil VALUES (5, 'ADMINISTRATEUR'); |
345 |
INSERT INTO om_profil VALUES (4, 'SUPER UTILISATEUR'); |
INSERT INTO om_profil VALUES (4, 'SUPER UTILISATEUR'); |
346 |
INSERT INTO om_profil VALUES (3, 'UTILISATEUR'); |
INSERT INTO om_profil VALUES (3, 'UTILISATEUR'); |
355 |
INSERT INTO om_droit VALUES ('om_etat', 4); |
INSERT INTO om_droit VALUES ('om_etat', 4); |
356 |
INSERT INTO om_droit VALUES ('om_sousetat', 4); |
INSERT INTO om_droit VALUES ('om_sousetat', 4); |
357 |
INSERT INTO om_droit VALUES ('om_lettretype', 4); |
INSERT INTO om_droit VALUES ('om_lettretype', 4); |
358 |
|
INSERT INTO om_droit VALUES ('om_sig_point', 4); |
359 |
|
INSERT INTO om_droit VALUES ('om_widget', 4); |
360 |
INSERT INTO om_droit VALUES ('gen', 5); |
INSERT INTO om_droit VALUES ('gen', 5); |
361 |
INSERT INTO om_droit VALUES ('password', 4); |
INSERT INTO om_droit VALUES ('password', 4); |
362 |
|
INSERT INTO om_droit VALUES ('directory', 99); |
363 |
|
|
364 |
INSERT INTO om_utilisateur (om_utilisateur, nom, Login, Pwd, om_profil, email, om_collectivite,om_type) VALUES |
INSERT INTO om_utilisateur (om_utilisateur, nom, Login, Pwd, om_profil, email, om_collectivite,om_type) VALUES |
365 |
(1, 'ADMINISTRATEUR', 'admin', '21232f297a57a5a743894a0e4a801fc3', '5', '[email protected]', 1,''), |
(1, 'ADMINISTRATEUR', 'admin', '21232f297a57a5a743894a0e4a801fc3', '5', '[email protected]', 1,''), |
369 |
-- etat |
-- etat |
370 |
|
|
371 |
INSERT INTO om_etat ("om_etat", "om_collectivite", "id", "libelle", "actif", "orientation", "format", "footerfont", "footerattribut", "footertaille", "logo", "logoleft", "logotop", "titre", "titreleft", "titretop", "titrelargeur", "titrehauteur", "titrefont", "titreattribut", "titretaille", "titrebordure", "titrealign", "corps", "corpsleft", "corpstop", "corpslargeur", "corpshauteur", "corpsfont", "corpsattribut", "corpstaille", "corpsbordure", "corpsalign", "om_sql", "sousetat", "se_font", "se_margeleft", "se_margetop", "se_margeright", "se_couleurtexte") |
INSERT INTO om_etat ("om_etat", "om_collectivite", "id", "libelle", "actif", "orientation", "format", "footerfont", "footerattribut", "footertaille", "logo", "logoleft", "logotop", "titre", "titreleft", "titretop", "titrelargeur", "titrehauteur", "titrefont", "titreattribut", "titretaille", "titrebordure", "titrealign", "corps", "corpsleft", "corpstop", "corpslargeur", "corpshauteur", "corpsfont", "corpsattribut", "corpstaille", "corpsbordure", "corpsalign", "om_sql", "sousetat", "se_font", "se_margeleft", "se_margetop", "se_margeright", "se_couleurtexte") |
372 |
VALUES(1, 1, 'om_collectivite', 'om_collectivite gen le 12/11/2010', 'Oui', 'P', 'A4', 'helvetica', 'I', 8, 'logopdf.png', 58, 7, 'le &aujourdhui', 41, 36, 130, 10, 'helvetica', 'B', 15, '0', 'C', '[om_collectivite]\r\n[libelle]\r\n[niveau]', 7, 57, 195, 5, 'helvetica', '', 10, '0', 'J', 'select om_collectivite.om_collectivite as om_collectivite,om_collectivite.libelle as libelle,om_collectivite.niveau as niveau from om_collectivite where om_collectivite.om_collectivite=''&idx''', 'om_parametre.om_collectivite', 'helvetica', 8, 5, 5, '0-0-0'); |
VALUES(1, 1, 'om_collectivite', 'om_collectivite gen le 12/11/2010', 'Oui', 'P', 'A4', 'helvetica', 'I', 8, 'logopdf.png', 58, 7, 'le &aujourdhui', 41, 36, 130, 10, 'helvetica', 'B', 15, '0', 'C', '[om_collectivite]\r\n[libelle]\r\n[niveau]', 7, 57, 195, 5, 'helvetica', '', 10, '0', 'J', 'select om_collectivite.om_collectivite as om_collectivite,om_collectivite.libelle as libelle,om_collectivite.niveau as niveau from &DB_PREFIXEom_collectivite where om_collectivite.om_collectivite=''&idx''', 'om_parametre.om_collectivite', 'helvetica', 8, 5, 5, '0-0-0'); |
373 |
|
|
374 |
INSERT INTO "om_sousetat" VALUES |
INSERT INTO om_sousetat VALUES |
375 |
(1, 1, 'om_parametre.om_collectivite', 'gen le 12/11/2010', '', 'liste om_parametre', 10, 'helvetica', 'B', 10, '0', 'L', '0', '255-255-255', '0-0-0', 0, 5, '1', '1', '0|0|0', 7, 'TLB|TLB|LTBR', 'C|C|C', '255-255-255', '0-0-0', 195, '1', 10, '0-0-0', '243-246-246', '255-255-255', '1', 7, '65|65|65', 'TLB|TLB|LTBR', 'TLB|TLB|LTBR', 'C|C|C', '1', 10, 15, '255-255-255', 'TLB|TLB|LTBR', 'C|C|C', '1', 10, 5, '212-219-220', 'TLB|TLB|LTBR', 'C|C|C', '1', 10, 7, '255-255-255', 'TLB|TLB|LTBR', 'C|C|C', '999|999|999', '0|0|0', '0|0|0', '0|0|0', 'select om_parametre.om_parametre as om_parametre,om_parametre.libelle as libelle,om_parametre.valeur as valeur from om_parametre where om_parametre.om_collectivite=''&idx'''); |
(1, 1, 'om_parametre.om_collectivite', 'gen le 12/11/2010', 'Oui', 'liste om_parametre', 10, 'helvetica', 'B', 10, '0', 'L', '0', '255-255-255', '0-0-0', 0, 5, '1', '1', '0|0|0', 7, 'TLB|TLB|LTBR', 'C|C|C', '255-255-255', '0-0-0', 195, '1', 10, '0-0-0', '243-246-246', '255-255-255', '1', 7, '65|65|65', 'TLB|TLB|LTBR', 'TLB|TLB|LTBR', 'C|C|C', '1', 10, 15, '255-255-255', 'TLB|TLB|LTBR', 'C|C|C', '1', 10, 5, '212-219-220', 'TLB|TLB|LTBR', 'C|C|C', '1', 10, 7, '255-255-255', 'TLB|TLB|LTBR', 'C|C|C', '999|999|999', '0|0|0', '0|0|0', '0|0|0', 'select om_parametre.om_parametre as om_parametre,om_parametre.libelle as libelle,om_parametre.valeur as valeur from &DB_PREFIXEom_parametre where om_parametre.om_collectivite=''&idx'''); |
376 |
|
|
377 |
INSERT INTO om_lettretype (om_lettretype, om_collectivite, id, libelle,actif , orientation, format, logo, logoleft, logotop, titre, titreleft, titretop, titrelargeur, titrehauteur, titrefont, titreattribut, titretaille, titrebordure, titrealign, corps, corpsleft, corpstop, corpslargeur, corpshauteur, corpsfont, corpsattribut, corpstaille, corpsbordure, corpsalign, om_sql) VALUES |
INSERT INTO om_lettretype (om_lettretype, om_collectivite, id, libelle,actif , orientation, format, logo, logoleft, logotop, titre, titreleft, titretop, titrelargeur, titrehauteur, titrefont, titreattribut, titretaille, titrebordure, titrealign, corps, corpsleft, corpstop, corpslargeur, corpshauteur, corpsfont, corpsattribut, corpstaille, corpsbordure, corpsalign, om_sql) VALUES |
|
(1, 1, 'om_utilisateur', 'lettre aux utilisateur','Oui', 'P', 'A4', 'logo.png', 10, 10, 'le £datecourrier\r\n\r\n\r\n[nom]\r\n[collectivite]', 130, 16, 0, 10, 'arial', '', 14, '0', 'L', 'Nous avons le plaisir de vous envoyer votre login et votre mot de passe\r\n\r\nvotre login [login]\r\nvotre mot de passe ******\r\n\r\nVous souhaitant bonne reception.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n Votre administrateur', 40, 106, 110, 5, 'times', '', 10, '0', 'J', 'select nom,login,om_collectivite.libelle as collectivite\r\nfrom om_utilisateur inner join om_collectivite\r\non om_collectivite.om_collectivite=om_utilisateur.om_collectivite\r\nwhere om_utilisateur= &idx'); |
|
378 |
|
(1, 1, 'om_utilisateur', 'lettre aux utilisateur','Oui', 'P', 'A4', 'logo.png', 10, 10, 'le &datecourrier\r\n\r\n\r\n[nom]\r\n[collectivite]', 130, 16, 0, 10, 'arial', '', 14, '0', 'L', 'Nous avons le plaisir de vous envoyer votre login et votre mot de passe\r\n\r\nvotre login [login]\r\nvotre mot de passe ******\r\n\r\nVous souhaitant bonne reception.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n Votre administrateur', 40, 106, 110, 5, 'times', '', 10, '0', 'J', 'select nom,login,om_collectivite.libelle as collectivite\r\nfrom &DB_PREFIXEom_utilisateur inner join &DB_PREFIXEom_collectivite\r\non om_collectivite.om_collectivite=om_utilisateur.om_collectivite\r\nwhere om_utilisateur= &idx'); |