193 |
ALTER TABLE dossier ADD COLUMN avis_decision integer; |
ALTER TABLE dossier ADD COLUMN avis_decision integer; |
194 |
|
|
195 |
|
|
196 |
|
|
197 |
|
|
198 |
|
|
199 |
UPDATE consultation SET avis_consultation=(select avis_consultation.avis_consultation from avis_consultation where avis=avis_consultation.avis_old); |
UPDATE consultation SET avis_consultation=(select avis_consultation.avis_consultation from avis_consultation where avis=avis_consultation.avis_old); |
200 |
|
|
201 |
-- |
-- |
231 |
DROP TABLE avis_consultation_tmp; |
DROP TABLE avis_consultation_tmp; |
232 |
|
|
233 |
-- |
-- |
|
-- Ajout des droits sur l'objet consultation_encours |
|
|
-- |
|
|
|
|
|
|
|
|
INSERT INTO om_widget VALUES (1, 1, 'Retours de consultations', '../scr/tab.php?obj=consultation_mes_retours', '<script type=''text/javascript''> |
|
|
$.ajax({ |
|
|
type: ''GET'', |
|
|
url:''../app/get_num_consult.php'', |
|
|
cache: false, |
|
|
success: function(html){ |
|
|
$(''#number_return'').append(html); |
|
|
} |
|
|
}); |
|
|
</script> |
|
|
<div id="number_return"></div>',2); |
|
|
|
|
|
-- |
|
234 |
-- Ajout des droits sur les nouvelles tables |
-- Ajout des droits sur les nouvelles tables |
235 |
-- |
-- |
236 |
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'service_categorie', '4'); |
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'service_categorie', '4'); |
239 |
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'lien_service_service_categorie', '4'); |
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'lien_service_service_categorie', '4'); |
240 |
|
|
241 |
ALTER TABLE consultation ALTER service SET NOT NULL; |
ALTER TABLE consultation ALTER service SET NOT NULL; |
242 |
ALTER TABLE dossier ADD COLUMN enjeu boolean; |
ALTER TABLE dossier ADD COLUMN enjeu_erp boolean; |
243 |
|
ALTER TABLE dossier ADD COLUMN enjeu_urba boolean; |
244 |
|
|
245 |
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'consultation_mes_retours', 4); |
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'consultation_mes_retours', 4); |
246 |
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'consultation_tous_retours', 4); |
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'consultation_tous_retours', 4); |
247 |
|
|
330 |
dossier_instructeur_fkey FOREIGN KEY (instructeur) REFERENCES instructeur(instructeur); |
dossier_instructeur_fkey FOREIGN KEY (instructeur) REFERENCES instructeur(instructeur); |
331 |
|
|
332 |
-- Ajout des parametres des liens dans la table om_parametre |
-- Ajout des parametres des liens dans la table om_parametre |
333 |
INSERT INTO om_parametre VALUES (nextval('om_parametre_seq'::regclass),'lien_interne_vdm', '',1); |
INSERT INTO om_parametre VALUES (nextval('om_parametre_seq'::regclass),'services_consultes_lien_interne', '',1); |
334 |
INSERT INTO om_parametre VALUES (nextval('om_parametre_seq'::regclass),'lien_externe', '',1); |
INSERT INTO om_parametre VALUES (nextval('om_parametre_seq'::regclass),'services_consultes_lien_externe', '',1); |
335 |
ALTER TABLE om_parametre ALTER COLUMN valeur TYPE character varying(150); |
ALTER TABLE om_parametre ALTER COLUMN valeur TYPE character varying(150); |
336 |
|
|
337 |
|
|
348 |
ALTER TABLE ONLY arrondissement |
ALTER TABLE ONLY arrondissement |
349 |
ADD CONSTRAINT arrondissement_pkey PRIMARY KEY (arrondissement); |
ADD CONSTRAINT arrondissement_pkey PRIMARY KEY (arrondissement); |
350 |
|
|
351 |
|
CREATE SEQUENCE arrondissement_seq |
352 |
|
INCREMENT 1 |
353 |
|
MINVALUE 1 |
354 |
|
MAXVALUE 9223372036854775807 |
355 |
|
START 1 |
356 |
|
CACHE 1; |
357 |
|
|
358 |
CREATE TABLE quartier ( |
CREATE TABLE quartier ( |
359 |
quartier integer NOT NULL, |
quartier integer NOT NULL, |
360 |
arrondissement integer NOT NULL, |
arrondissement integer NOT NULL, |
367 |
ALTER TABLE ONLY quartier |
ALTER TABLE ONLY quartier |
368 |
ADD CONSTRAINT quartier_arrondissement_fkey FOREIGN KEY (arrondissement) REFERENCES arrondissement(arrondissement); |
ADD CONSTRAINT quartier_arrondissement_fkey FOREIGN KEY (arrondissement) REFERENCES arrondissement(arrondissement); |
369 |
|
|
370 |
|
CREATE SEQUENCE quartier_seq |
371 |
|
INCREMENT 1 |
372 |
|
MINVALUE 1 |
373 |
|
MAXVALUE 9223372036854775807 |
374 |
|
START 1 |
375 |
|
CACHE 1; |
376 |
|
|
377 |
CREATE TABLE lien_localisation_nature ( |
CREATE TABLE lien_localisation_nature ( |
378 |
lien_localisation_nature integer NOT NULL, |
lien_localisation_nature integer NOT NULL, |
379 |
nature character varying(2), |
nature character varying(2), |
394 |
ALTER TABLE ONLY lien_localisation_nature |
ALTER TABLE ONLY lien_localisation_nature |
395 |
ADD CONSTRAINT lien_localisation_nature_instructeur_fkey FOREIGN KEY (instructeur) REFERENCES instructeur(instructeur); |
ADD CONSTRAINT lien_localisation_nature_instructeur_fkey FOREIGN KEY (instructeur) REFERENCES instructeur(instructeur); |
396 |
|
|
397 |
|
CREATE SEQUENCE lien_localisation_nature_seq |
398 |
|
INCREMENT 1 |
399 |
|
MINVALUE 1 |
400 |
|
MAXVALUE 9223372036854775807 |
401 |
|
START 1 |
402 |
|
CACHE 1; |
403 |
|
|
404 |
-- Ajout des droits pour le retour des services |
-- Ajout des droits pour le retour des services |
405 |
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'demande_avis_encours', '2'); |
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'demande_avis_encours', '2'); |
406 |
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'consultation_retour_service', '2'); |
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'consultation_retour_service', '2'); |
445 |
type character varying(60), |
type character varying(60), |
446 |
emetteur character varying(40), |
emetteur character varying(40), |
447 |
date_emission DATE NOT NULL, |
date_emission DATE NOT NULL, |
|
enjeux_erp boolean default FALSE, |
|
|
enjeux_urba boolean default FALSE, |
|
448 |
lu boolean default FALSE, |
lu boolean default FALSE, |
449 |
FOREIGN KEY ( dossier ) REFERENCES dossier ( dossier ) -- add this |
FOREIGN KEY ( dossier ) REFERENCES dossier ( dossier ) -- add this |
450 |
); |
); |
453 |
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'menu_suivi', '2'); |
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'menu_suivi', '2'); |
454 |
|
|
455 |
-- Droit de l'ajout forcé d'un instructeur |
-- Droit de l'ajout forcé d'un instructeur |
|
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'dossier_modifier_instructeur', '2'); |
|
456 |
|
INSERT INTO om_droit VALUES (nextval('om_droit_seq'),'dossier_modifier_instructeur', '2'); |
457 |
|
|
458 |
|
-- Module 1 |
459 |
|
CREATE TABLE dossier_autorisation_type ( |
460 |
|
dossier_autorisation_type integer, |
461 |
|
code character varying(20), |
462 |
|
libelle character varying(100), |
463 |
|
description text, |
464 |
|
confidentiel boolean default FALSE |
465 |
|
); |
466 |
|
|
467 |
|
ALTER TABLE ONLY dossier_autorisation_type |
468 |
|
ADD CONSTRAINT dossier_autorisation_type_pkey PRIMARY KEY (dossier_autorisation_type); |
469 |
|
|
470 |
|
CREATE SEQUENCE dossier_autorisation_type_seq |
471 |
|
INCREMENT 1 |
472 |
|
MINVALUE 1 |
473 |
|
MAXVALUE 9223372036854775807 |
474 |
|
START 1 |
475 |
|
CACHE 1; |
476 |
|
|
477 |
|
-- |
478 |
|
|
479 |
|
CREATE TABLE dossier_autorisation_type_detaille ( |
480 |
|
dossier_autorisation_type_detaille integer, |
481 |
|
code character varying(20), |
482 |
|
libelle character varying(100), |
483 |
|
description text, |
484 |
|
dossier_autorisation_type integer |
485 |
|
); |
486 |
|
|
487 |
|
ALTER TABLE ONLY dossier_autorisation_type_detaille |
488 |
|
ADD CONSTRAINT dossier_autorisation_type_detaille_pkey PRIMARY KEY (dossier_autorisation_type_detaille); |
489 |
|
ALTER TABLE ONLY dossier_autorisation_type_detaille |
490 |
|
ADD CONSTRAINT dossier_autorisation_type_detaille_dossier_autorisation_type_fkey FOREIGN KEY (dossier_autorisation_type) REFERENCES dossier_autorisation_type(dossier_autorisation_type); |
491 |
|
|
492 |
|
CREATE SEQUENCE dossier_autorisation_type_detaille_seq |
493 |
|
INCREMENT 1 |
494 |
|
MINVALUE 1 |
495 |
|
MAXVALUE 9223372036854775807 |
496 |
|
START 1 |
497 |
|
CACHE 1; |
498 |
|
|
499 |
|
-- |
500 |
|
|
501 |
|
CREATE TABLE dossier_instruction_type ( |
502 |
|
dossier_instruction_type integer, |
503 |
|
code character varying(20), |
504 |
|
libelle character varying(100), |
505 |
|
description text, |
506 |
|
dossier_autorisation_type_detaille integer, |
507 |
|
suffixe boolean default FALSE |
508 |
|
); |
509 |
|
|
510 |
|
ALTER TABLE ONLY dossier_instruction_type |
511 |
|
ADD CONSTRAINT dossier_instruction_type_pkey PRIMARY KEY (dossier_instruction_type); |
512 |
|
ALTER TABLE ONLY dossier_instruction_type |
513 |
|
ADD CONSTRAINT dossier_instruction_type_dossier_autorisation_type_detaille_fkey FOREIGN KEY (dossier_autorisation_type_detaille) REFERENCES dossier_autorisation_type_detaille(dossier_autorisation_type_detaille); |
514 |
|
|
515 |
|
CREATE SEQUENCE dossier_instruction_type_seq |
516 |
|
INCREMENT 1 |
517 |
|
MINVALUE 1 |
518 |
|
MAXVALUE 9223372036854775807 |
519 |
|
START 1 |
520 |
|
CACHE 1; |
521 |
|
|
522 |
|
-- |
523 |
|
|
524 |
|
CREATE TABLE demande_genre ( |
525 |
|
demande_genre integer, |
526 |
|
code character varying(20), |
527 |
|
libelle character varying(100), |
528 |
|
description text |
529 |
|
); |
530 |
|
|
531 |
|
ALTER TABLE ONLY demande_genre |
532 |
|
ADD CONSTRAINT demande_genre_pkey PRIMARY KEY (demande_genre); |
533 |
|
|
534 |
|
CREATE SEQUENCE demande_genre_seq |
535 |
|
INCREMENT 1 |
536 |
|
MINVALUE 1 |
537 |
|
MAXVALUE 9223372036854775807 |
538 |
|
START 1 |
539 |
|
CACHE 1; |
540 |
|
|
541 |
|
-- |
542 |
|
|
543 |
|
CREATE TABLE groupe ( |
544 |
|
groupe integer, |
545 |
|
code character varying(20), |
546 |
|
libelle character varying(100), |
547 |
|
description text, |
548 |
|
demande_genre integer |
549 |
|
); |
550 |
|
|
551 |
|
ALTER TABLE ONLY groupe |
552 |
|
ADD CONSTRAINT groupe_pkey PRIMARY KEY (groupe); |
553 |
|
ALTER TABLE ONLY groupe |
554 |
|
ADD CONSTRAINT groupe_demande_genre_fkey FOREIGN KEY (demande_genre) REFERENCES demande_genre(demande_genre); |
555 |
|
|
556 |
|
CREATE SEQUENCE groupe_seq |
557 |
|
INCREMENT 1 |
558 |
|
MINVALUE 1 |
559 |
|
MAXVALUE 9223372036854775807 |
560 |
|
START 1 |
561 |
|
CACHE 1; |
562 |
|
|
563 |
|
-- Ajout de clé étrangère à la table dossier_autorisation_type |
564 |
|
ALTER TABLE dossier_autorisation_type ADD COLUMN groupe integer; |
565 |
|
ALTER TABLE ONLY dossier_autorisation_type |
566 |
|
ADD CONSTRAINT dossier_autorisation_type_groupe_fkey FOREIGN KEY (groupe) REFERENCES groupe(groupe); |
567 |
|
|
568 |
|
--Demande nature |
569 |
|
|
570 |
|
CREATE TABLE demande_nature ( |
571 |
|
demande_nature integer, |
572 |
|
code character varying(20), |
573 |
|
libelle character varying(100), |
574 |
|
description text |
575 |
|
); |
576 |
|
|
577 |
|
ALTER TABLE ONLY demande_nature |
578 |
|
ADD CONSTRAINT demande_nature_pkey PRIMARY KEY (demande_nature); |
579 |
|
|
580 |
|
CREATE SEQUENCE demande_nature_seq |
581 |
|
INCREMENT 1 |
582 |
|
MINVALUE 1 |
583 |
|
MAXVALUE 9223372036854775807 |
584 |
|
START 1 |
585 |
|
CACHE 1; |
586 |
|
|
587 |
|
--Demande type |
588 |
|
|
589 |
|
CREATE TABLE demande_type ( |
590 |
|
demande_type integer, |
591 |
|
code character varying(20), |
592 |
|
libelle character varying(100), |
593 |
|
description text, |
594 |
|
demande_nature integer, |
595 |
|
groupe integer, |
596 |
|
dossier_instruction_type integer, |
597 |
|
dossier_autorisation_type_detaille integer, |
598 |
|
contraintes character varying(20), |
599 |
|
etats_dossier_autorisation_autorises character varying(100), |
600 |
|
qualification boolean, |
601 |
|
evenement integer |
602 |
|
); |
603 |
|
|
604 |
|
ALTER TABLE ONLY demande_type |
605 |
|
ADD CONSTRAINT demande_type_pkey PRIMARY KEY (demande_type); |
606 |
|
ALTER TABLE ONLY demande_type |
607 |
|
ADD CONSTRAINT demande_type_demande_nature_fkey FOREIGN KEY (demande_nature) REFERENCES demande_nature(demande_nature); |
608 |
|
ALTER TABLE ONLY demande_type |
609 |
|
ADD CONSTRAINT demande_type_groupe_fkey FOREIGN KEY (groupe) REFERENCES groupe(groupe); |
610 |
|
ALTER TABLE ONLY demande_type |
611 |
|
ADD CONSTRAINT demande_type_dossier_instruction_type_fkey FOREIGN KEY (dossier_instruction_type) REFERENCES dossier_instruction_type(dossier_instruction_type); |
612 |
|
ALTER TABLE ONLY demande_type |
613 |
|
ADD CONSTRAINT demande_type_dossier_autorisation_type_detaille_fkey FOREIGN KEY (dossier_autorisation_type_detaille) REFERENCES dossier_autorisation_type_detaille(dossier_autorisation_type_detaille); |
614 |
|
ALTER TABLE ONLY demande_type |
615 |
|
ADD CONSTRAINT demande_type_evenement_fkey FOREIGN KEY (evenement) REFERENCES evenement(evenement); |
616 |
|
|
617 |
|
CREATE SEQUENCE demande_type_seq |
618 |
|
INCREMENT 1 |
619 |
|
MINVALUE 1 |
620 |
|
MAXVALUE 9223372036854775807 |
621 |
|
START 1 |
622 |
|
CACHE 1; |
623 |
|
|
624 |
|
-- |
625 |
|
|
626 |
|
CREATE TABLE lien_evenement_dossier_autorisation_type ( |
627 |
|
lien_evenement_dossier_autorisation_type integer, |
628 |
|
evenement integer, |
629 |
|
dossier_autorisation_type integer |
630 |
|
); |
631 |
|
|
632 |
|
ALTER TABLE ONLY lien_evenement_dossier_autorisation_type |
633 |
|
ADD CONSTRAINT lien_evenement_dossier_autorisation_type_pkey PRIMARY KEY (lien_evenement_dossier_autorisation_type); |
634 |
|
ALTER TABLE ONLY lien_evenement_dossier_autorisation_type |
635 |
|
ADD CONSTRAINT lien_evenement_dossier_autorisation_type_evenement_fkey FOREIGN KEY (evenement) REFERENCES evenement(evenement); |
636 |
|
ALTER TABLE ONLY lien_evenement_dossier_autorisation_type |
637 |
|
ADD CONSTRAINT lien_evenement_dossier_autorisation_type_dossier_autorisation_type_fkey FOREIGN KEY (dossier_autorisation_type) REFERENCES dossier_autorisation_type(dossier_autorisation_type); |
638 |
|
|
639 |
|
CREATE SEQUENCE lien_evenement_dossier_autorisation_type_seq |
640 |
|
INCREMENT 1 |
641 |
|
MINVALUE 1 |
642 |
|
MAXVALUE 9223372036854775807 |
643 |
|
START 1 |
644 |
|
CACHE 1; |
645 |
|
|
646 |
|
-- |
647 |
|
|
648 |
|
CREATE TABLE autorite_competente ( |
649 |
|
autorite_competente integer, |
650 |
|
code character varying(20), |
651 |
|
libelle character varying(100), |
652 |
|
description text |
653 |
|
); |
654 |
|
|
655 |
|
ALTER TABLE ONLY autorite_competente |
656 |
|
ADD CONSTRAINT autorite_competente_pkey PRIMARY KEY (autorite_competente); |
657 |
|
|
658 |
|
CREATE SEQUENCE autorite_competente_seq |
659 |
|
INCREMENT 1 |
660 |
|
MINVALUE 1 |
661 |
|
MAXVALUE 9223372036854775807 |
662 |
|
START 1 |
663 |
|
CACHE 1; |
664 |
|
|
665 |
|
-- Ajout de clé étrangère à la table dossier_autorisation_type |
666 |
|
ALTER TABLE dossier ADD COLUMN autorite_competente integer; |
667 |
|
ALTER TABLE ONLY dossier |
668 |
|
ADD CONSTRAINT dossier_autorite_competente_fkey FOREIGN KEY (autorite_competente) REFERENCES autorite_competente(autorite_competente); |
669 |
|
|
670 |
|
-- Donnees des tables |
671 |
|
INSERT INTO dossier_autorisation_type(dossier_autorisation_type, code, libelle) SELECT nextval('dossier_autorisation_type_seq'), nature, libelle FROM nature; |
672 |
|
INSERT INTO dossier_autorisation_type_detaille(dossier_autorisation_type_detaille, code, libelle) SELECT nextval('dossier_autorisation_type_seq'), nature, libelle FROM nature; |
673 |
|
|
674 |
|
INSERT INTO demande_genre VALUES (nextval('demande_genre_seq'), 'URBA', 'Pôle Urbanisme', 'Responsabilité de la DDU'); |
675 |
|
INSERT INTO demande_genre VALUES (nextval('demande_genre_seq'), 'ERP', 'Pôle ERP', 'Responsabilité de la DGUP'); |
676 |
|
|
677 |
|
INSERT INTO groupe VALUES (nextval('groupe_seq'), 'ADS', 'Autorisation ADS', '',1); |
678 |
|
INSERT INTO groupe VALUES (nextval('groupe_seq'), 'CTX', 'Contentieux dans le domaine urbanisme', '',1); |
679 |
|
INSERT INTO groupe VALUES (nextval('groupe_seq'), 'CU', 'Changement d''usage', '',1); |
680 |
|
INSERT INTO groupe VALUES (nextval('groupe_seq'), 'RU', 'Renseignement d''urbanisme', '',1); |
681 |
|
INSERT INTO groupe VALUES (nextval('groupe_seq'), 'ERP', 'ERP', '',2); |
682 |
|
|
683 |
|
-- Table Demande |
684 |
|
|
685 |
|
CREATE TABLE demande ( |
686 |
|
demande integer, |
687 |
|
dossier_autorisation_type_detaille integer, |
688 |
|
demande_type integer, |
689 |
|
date_demande date, |
690 |
|
terrain_references_cadastrales character varying(100), |
691 |
|
terrain_adresse_voie_numero integer, |
692 |
|
complement character varying(30), |
693 |
|
terrain_adresse_lieu_dit character varying(30), |
694 |
|
terrain_adresse_localite character varying(30), |
695 |
|
terrain_adresse_code_postal character varying(5), |
696 |
|
terrain_adresse_bp character varying(15), |
697 |
|
terrain_adresse_cedex character varying(15), |
698 |
|
terrain_superficie double precision, |
699 |
|
nombre_lots integer |
700 |
|
); |
701 |
|
|
702 |
|
ALTER TABLE ONLY demande |
703 |
|
ADD CONSTRAINT demande_pkey PRIMARY KEY (demande); |
704 |
|
ALTER TABLE ONLY demande |
705 |
|
ADD CONSTRAINT demande_dossier_autorisation_type_detaille_fkey FOREIGN KEY (dossier_autorisation_type_detaille) REFERENCES dossier_autorisation_type_detaille(dossier_autorisation_type_detaille); |
706 |
|
ALTER TABLE ONLY demande |
707 |
|
ADD CONSTRAINT demande_type_demande_type_fkey FOREIGN KEY (demande_type) REFERENCES demande_type(demande_type); |
708 |
|
|
709 |
|
CREATE SEQUENCE demande_seq |
710 |
|
INCREMENT 1 |
711 |
|
MINVALUE 1 |
712 |
|
MAXVALUE 9223372036854775807 |
713 |
|
START 1 |
714 |
|
CACHE 1; |
715 |
|
|
716 |
|
-- Table Demandeur |
717 |
|
|
718 |
|
CREATE TABLE demandeur ( |
719 |
|
demandeur integer, |
720 |
|
type_demandeur character varying(40), |
721 |
|
particulier_civilite character varying(10), |
722 |
|
particulier_nom character varying(40), |
723 |
|
particulier_prenom character varying(40), |
724 |
|
particulier_date_naissance date, |
725 |
|
particulier_commune_naissance character varying(30), |
726 |
|
particulier_departement_naissance character varying(80), |
727 |
|
personne_morale_denomination character varying(15), |
728 |
|
personne_morale_raison_sociale character varying(15), |
729 |
|
personne_morale_siret character varying(15), |
730 |
|
personne_morale_categorie_juridique character varying(15), |
731 |
|
personne_morale_civilite character varying(10), |
732 |
|
personne_morale_nom character varying(40), |
733 |
|
personne_morale_prenom character varying(40), |
734 |
|
numero character varying(5), |
735 |
|
voie character varying(40), |
736 |
|
complement character varying(39), |
737 |
|
lieu_dit character varying(39), |
738 |
|
localite character varying(30), |
739 |
|
code_postal character varying(5), |
740 |
|
bp character varying(5), |
741 |
|
cedex character varying(5), |
742 |
|
pays character varying(40), |
743 |
|
division_territoriale character varying(40), |
744 |
|
telephone_fixe character varying(14), |
745 |
|
telephone_mobile character varying(14), |
746 |
|
indicatif character varying(5), |
747 |
|
courriel character varying(40), |
748 |
|
notification boolean, |
749 |
|
frequent boolean, |
750 |
|
demande integer |
751 |
|
); |
752 |
|
|
753 |
|
ALTER TABLE ONLY demandeur |
754 |
|
ADD CONSTRAINT demandeur_pkey PRIMARY KEY (demandeur); |
755 |
|
ALTER TABLE ONLY demandeur |
756 |
|
ADD CONSTRAINT demandeur_particulier_civilite_fkey FOREIGN KEY (particulier_civilite) REFERENCES civilite(civilite); |
757 |
|
ALTER TABLE ONLY demandeur |
758 |
|
ADD CONSTRAINT demandeur_personne_morale_civilite_fkey FOREIGN KEY (personne_morale_civilite) REFERENCES civilite(civilite); |
759 |
|
ALTER TABLE ONLY demandeur |
760 |
|
ADD CONSTRAINT demandeur_demande_fkey FOREIGN KEY (demande) REFERENCES demande(demande); |
761 |
|
|
762 |
|
CREATE SEQUENCE demandeur_seq |
763 |
|
INCREMENT 1 |
764 |
|
MINVALUE 1 |
765 |
|
MAXVALUE 9223372036854775807 |
766 |
|
START 1 |
767 |
|
CACHE 1; |
768 |
|
|
769 |
|
-- Table lot |
770 |
|
|
771 |
|
CREATE TABLE lot ( |
772 |
|
lot integer, |
773 |
|
dossier character varying(12) |
774 |
|
); |
775 |
|
|
776 |
|
ALTER TABLE ONLY lot |
777 |
|
ADD CONSTRAINT lot_pkey PRIMARY KEY (lot); |
778 |
|
ALTER TABLE ONLY lot |
779 |
|
ADD CONSTRAINT lot_dossier_fkey FOREIGN KEY (dossier) REFERENCES dossier(dossier); |
780 |
|
|
781 |
|
CREATE SEQUENCE lot_seq |
782 |
|
INCREMENT 1 |
783 |
|
MINVALUE 1 |
784 |
|
MAXVALUE 9223372036854775807 |
785 |
|
START 1 |
786 |
|
CACHE 1; |
787 |
|
|
788 |
|
-- Table lien_lot_demandeur |
789 |
|
|
790 |
|
CREATE TABLE lien_lot_demandeur ( |
791 |
|
lien_lot_demandeur integer, |
792 |
|
lot integer, |
793 |
|
demandeur integer |
794 |
|
); |
795 |
|
|
796 |
|
ALTER TABLE ONLY lien_lot_demandeur |
797 |
|
ADD CONSTRAINT lien_lot_demandeur_pkey PRIMARY KEY (lien_lot_demandeur); |
798 |
|
ALTER TABLE ONLY lien_lot_demandeur |
799 |
|
ADD CONSTRAINT lien_lot_demandeur_lot_fkey FOREIGN KEY (lot) REFERENCES lot(lot); |
800 |
|
ALTER TABLE ONLY lien_lot_demandeur |
801 |
|
ADD CONSTRAINT lien_lot_demandeur_demandeur_fkey FOREIGN KEY (demandeur) REFERENCES demandeur(demandeur); |
802 |
|
|
803 |
|
CREATE SEQUENCE lien_lot_demandeur_seq |
804 |
|
INCREMENT 1 |
805 |
|
MINVALUE 1 |
806 |
|
MAXVALUE 9223372036854775807 |
807 |
|
START 1 |
808 |
|
CACHE 1; |
809 |
|
|
810 |
|
|
811 |
|
--- |
812 |
|
--- Nouvelle gestion des tableaux de bord |
813 |
|
--- |
814 |
|
|
815 |
|
CREATE TABLE om_dashboard ( |
816 |
|
om_dashboard integer NOT NULL, |
817 |
|
om_profil integer NOT NULL, |
818 |
|
bloc character varying(10) NOT NULL, |
819 |
|
position integer, |
820 |
|
om_widget integer NOT NULL |
821 |
|
); |
822 |
|
|
823 |
|
ALTER TABLE ONLY om_dashboard |
824 |
|
ADD CONSTRAINT om_dashboard_pkey PRIMARY KEY (om_dashboard); |
825 |
|
ALTER TABLE ONLY om_dashboard |
826 |
|
ADD CONSTRAINT om_dashboard_om_profil_fkey FOREIGN KEY (om_profil) REFERENCES om_profil(om_profil); |
827 |
|
ALTER TABLE ONLY om_dashboard |
828 |
|
ADD CONSTRAINT om_dashboard_om_widget_fkey FOREIGN KEY (om_widget) REFERENCES om_widget(om_widget); |
829 |
|
|
830 |
|
CREATE SEQUENCE om_dashboard_seq |
831 |
|
START WITH 1 |
832 |
|
INCREMENT BY 1 |
833 |
|
NO MINVALUE |
834 |
|
NO MAXVALUE |
835 |
|
CACHE 1; |
836 |
|
|
837 |
|
SELECT pg_catalog.setval('om_dashboard_seq', 1, false); |
838 |
|
|
839 |
|
ALTER TABLE om_widget |
840 |
|
DROP CONSTRAINT om_widget_om_profil_fkey; |
841 |
|
|
842 |
|
ALTER TABlE om_widget DROP COLUMN om_profil; |
843 |
|
|
844 |
|
ALTER TABLE om_widget ADD COLUMN "type" character varying(40) NOT NULL DEFAULT 'web'::character varying; |
845 |
|
ALTER TABLE om_widget ALTER COLUMN "lien" SET DEFAULT ''::character varying; |
846 |
|
ALTER TABLE om_widget ALTER COLUMN "texte" SET DEFAULT ''::text; |
847 |
|
|
848 |
|
|