/[openfoncier]/trunk/data/pgsql/init_metier.sql
ViewVC logotype

Contents of /trunk/data/pgsql/init_metier.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2150 - (show annotations)
Fri Aug 9 14:10:26 2013 UTC (11 years, 5 months ago) by vpihour
File size: 115371 byte(s)
Préparation de la release de la version 3.8.0-a1

1 --------------------------------------------------------------------------------
2 -- Instructions de base de l'applicatif
3 --
4 -- Génération de ce fichier :
5 -- pg_dump -s -O -n openads -T openads.om_* openads > /tmp/init_metier.sql
6 -- REMPLACER : START WITH * by START WITH 1
7 -- SUPPRIMER : CONSTRAINT *geom*
8 -- REMPLACER : public.geometry by text sur les champs geom
9 --
10 -- @package openfoncier
11 -- @version SVN : $Id$
12 --------------------------------------------------------------------------------
13
14 --
15 -- PostgreSQL database dump
16 --
17
18 --
19 -- Name: action; Type: TABLE; Schema: openads; Owner: -; Tablespace:
20 --
21
22 CREATE TABLE action (
23 action character varying(20) NOT NULL,
24 libelle character varying(60) NOT NULL,
25 regle_etat character varying(60),
26 regle_delai character varying(60),
27 regle_accord_tacite character varying(60),
28 regle_avis character varying(60),
29 regle_date_limite character varying(60),
30 regle_date_notification_delai character varying(60),
31 regle_date_complet character varying(60),
32 regle_date_validite character varying(60),
33 regle_date_decision character varying(60),
34 regle_date_chantier character varying(60),
35 regle_date_achevement character varying(60),
36 regle_date_conformite character varying(60),
37 regle_date_rejet character varying(60),
38 regle_date_dernier_depot character varying(60),
39 regle_date_limite_incompletude character varying(60),
40 regle_delai_incompletude character varying(60),
41 regle_autorite_competente character varying(60)
42 );
43
44
45 --
46 -- Name: affectation_automatique; Type: TABLE; Schema: openads; Owner: -; Tablespace:
47 --
48
49 CREATE TABLE affectation_automatique (
50 affectation_automatique integer NOT NULL,
51 arrondissement integer,
52 quartier integer,
53 section character varying(2),
54 instructeur integer NOT NULL,
55 dossier_autorisation_type_detaille integer
56 );
57
58
59 --
60 -- Name: affectation_automatique_seq; Type: SEQUENCE; Schema: openads; Owner: -
61 --
62
63 CREATE SEQUENCE affectation_automatique_seq
64 START WITH 1
65 INCREMENT BY 1
66 NO MINVALUE
67 NO MAXVALUE
68 CACHE 1;
69
70
71 --
72 -- Name: affectation_automatique_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
73 --
74
75 ALTER SEQUENCE affectation_automatique_seq OWNED BY affectation_automatique.affectation_automatique;
76
77
78 --
79 -- Name: architecte; Type: TABLE; Schema: openads; Owner: -; Tablespace:
80 --
81
82 CREATE TABLE architecte (
83 architecte integer NOT NULL,
84 nom character varying(40) NOT NULL,
85 prenom character varying(40) DEFAULT ''::character varying NOT NULL,
86 adresse1 character varying(40) DEFAULT ''::character varying NOT NULL,
87 adresse2 character varying(40) DEFAULT ''::character varying NOT NULL,
88 cp character varying(5) DEFAULT ''::character varying NOT NULL,
89 ville character varying(40) DEFAULT ''::character varying NOT NULL,
90 pays character varying(40) DEFAULT ''::character varying NOT NULL,
91 inscription character varying(20) DEFAULT ''::character varying NOT NULL,
92 telephone character varying(14) DEFAULT ''::character varying NOT NULL,
93 fax character varying(14) DEFAULT ''::character varying NOT NULL,
94 email character varying(40) DEFAULT ''::character varying NOT NULL,
95 note text,
96 frequent boolean,
97 nom_cabinet character varying(100)
98 );
99
100
101 --
102 -- Name: architecte_seq; Type: SEQUENCE; Schema: openads; Owner: -
103 --
104
105 CREATE SEQUENCE architecte_seq
106 START WITH 1
107 INCREMENT BY 1
108 NO MINVALUE
109 NO MAXVALUE
110 CACHE 1;
111
112
113 --
114 -- Name: architecte_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
115 --
116
117 ALTER SEQUENCE architecte_seq OWNED BY architecte.architecte;
118
119
120 --
121 -- Name: arrondissement; Type: TABLE; Schema: openads; Owner: -; Tablespace:
122 --
123
124 CREATE TABLE arrondissement (
125 arrondissement integer NOT NULL,
126 libelle character varying(3) NOT NULL,
127 code_postal character varying(5) NOT NULL
128 );
129
130
131 --
132 -- Name: arrondissement_seq; Type: SEQUENCE; Schema: openads; Owner: -
133 --
134
135 CREATE SEQUENCE arrondissement_seq
136 START WITH 1
137 INCREMENT BY 1
138 NO MINVALUE
139 NO MAXVALUE
140 CACHE 1;
141
142
143 --
144 -- Name: arrondissement_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
145 --
146
147 ALTER SEQUENCE arrondissement_seq OWNED BY arrondissement.arrondissement;
148
149
150 --
151 -- Name: autorite_competente; Type: TABLE; Schema: openads; Owner: -; Tablespace:
152 --
153
154 CREATE TABLE autorite_competente (
155 autorite_competente integer NOT NULL,
156 code character varying(20),
157 libelle character varying(100),
158 description text
159 );
160
161
162 --
163 -- Name: autorite_competente_seq; Type: SEQUENCE; Schema: openads; Owner: -
164 --
165
166 CREATE SEQUENCE autorite_competente_seq
167 START WITH 1
168 INCREMENT BY 1
169 NO MINVALUE
170 NO MAXVALUE
171 CACHE 1;
172
173
174 --
175 -- Name: autorite_competente_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
176 --
177
178 ALTER SEQUENCE autorite_competente_seq OWNED BY autorite_competente.autorite_competente;
179
180
181 --
182 -- Name: avis_consultation; Type: TABLE; Schema: openads; Owner: -; Tablespace:
183 --
184
185 CREATE TABLE avis_consultation (
186 libelle character varying(30) NOT NULL,
187 abrege character varying(10),
188 om_validite_debut date,
189 om_validite_fin date,
190 avis_consultation integer NOT NULL
191 );
192
193
194 --
195 -- Name: avis_consultation_seq; Type: SEQUENCE; Schema: openads; Owner: -
196 --
197
198 CREATE SEQUENCE avis_consultation_seq
199 START WITH 1
200 INCREMENT BY 1
201 NO MINVALUE
202 NO MAXVALUE
203 CACHE 1;
204
205
206 --
207 -- Name: avis_consultation_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
208 --
209
210 ALTER SEQUENCE avis_consultation_seq OWNED BY avis_consultation.avis_consultation;
211
212
213 --
214 -- Name: avis_decision; Type: TABLE; Schema: openads; Owner: -; Tablespace:
215 --
216
217 CREATE TABLE avis_decision (
218 libelle character varying(30) NOT NULL,
219 typeavis character(1) DEFAULT ''::bpchar NOT NULL,
220 sitadel character(1) DEFAULT ''::bpchar NOT NULL,
221 sitadel_motif character(1) DEFAULT ''::bpchar NOT NULL,
222 avis_decision integer NOT NULL
223 );
224
225
226 --
227 -- Name: avis_decision_seq; Type: SEQUENCE; Schema: openads; Owner: -
228 --
229
230 CREATE SEQUENCE avis_decision_seq
231 START WITH 1
232 INCREMENT BY 1
233 NO MINVALUE
234 NO MAXVALUE
235 CACHE 1;
236
237
238 --
239 -- Name: avis_decision_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
240 --
241
242 ALTER SEQUENCE avis_decision_seq OWNED BY avis_decision.avis_decision;
243
244
245 --
246 -- Name: bible; Type: TABLE; Schema: openads; Owner: -; Tablespace:
247 --
248
249 CREATE TABLE bible (
250 bible integer NOT NULL,
251 libelle character varying(60) NOT NULL,
252 evenement integer,
253 contenu text NOT NULL,
254 complement integer,
255 automatique character(3) DEFAULT ''::bpchar NOT NULL,
256 dossier_autorisation_type integer
257 );
258
259
260 --
261 -- Name: bible_seq; Type: SEQUENCE; Schema: openads; Owner: -
262 --
263
264 CREATE SEQUENCE bible_seq
265 START WITH 1
266 INCREMENT BY 1
267 NO MINVALUE
268 NO MAXVALUE
269 CACHE 1;
270
271
272 --
273 -- Name: bible_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
274 --
275
276 ALTER SEQUENCE bible_seq OWNED BY bible.bible;
277
278
279 --
280 -- Name: blocnote; Type: TABLE; Schema: openads; Owner: -; Tablespace:
281 --
282
283 CREATE TABLE blocnote (
284 blocnote integer NOT NULL,
285 categorie character varying(20) NOT NULL,
286 note text NOT NULL,
287 dossier character varying(30)
288 );
289
290
291 --
292 -- Name: blocnote_seq; Type: SEQUENCE; Schema: openads; Owner: -
293 --
294
295 CREATE SEQUENCE blocnote_seq
296 START WITH 1
297 INCREMENT BY 1
298 NO MINVALUE
299 NO MAXVALUE
300 CACHE 1;
301
302
303 --
304 -- Name: blocnote_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
305 --
306
307 ALTER SEQUENCE blocnote_seq OWNED BY blocnote.blocnote;
308
309
310 --
311 -- Name: categorie_demandeur; Type: TABLE; Schema: openads; Owner: -; Tablespace:
312 --
313
314 CREATE TABLE categorie_demandeur (
315 categorie_demandeur integer NOT NULL,
316 libelle character varying(40) NOT NULL
317 );
318
319
320 --
321 -- Name: categorie_demandeur_seq; Type: SEQUENCE; Schema: openads; Owner: -
322 --
323
324 CREATE SEQUENCE categorie_demandeur_seq
325 START WITH 1
326 INCREMENT BY 1
327 NO MINVALUE
328 NO MAXVALUE
329 CACHE 1;
330
331
332 --
333 -- Name: categorie_demandeur_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
334 --
335
336 ALTER SEQUENCE categorie_demandeur_seq OWNED BY categorie_demandeur.categorie_demandeur;
337
338
339 --
340 -- Name: cerfa; Type: TABLE; Schema: openads; Owner: -; Tablespace:
341 --
342
343 CREATE TABLE cerfa (
344 cerfa integer NOT NULL,
345 libelle character varying(200),
346 code character varying(20),
347 om_validite_debut date,
348 om_validite_fin date,
349 am_lotiss boolean,
350 am_autre_div boolean,
351 am_camping boolean,
352 am_caravane boolean,
353 am_carav_duree boolean,
354 am_statio boolean,
355 am_statio_cont boolean,
356 am_affou_exhau boolean,
357 am_affou_exhau_sup boolean,
358 am_affou_prof boolean,
359 am_exhau_haut boolean,
360 am_coupe_abat boolean,
361 am_prot_plu boolean,
362 am_prot_muni boolean,
363 am_mobil_voyage boolean,
364 am_aire_voyage boolean,
365 am_rememb_afu boolean,
366 am_parc_resid_loi boolean,
367 am_sport_moto boolean,
368 am_sport_attrac boolean,
369 am_sport_golf boolean,
370 am_mob_art boolean,
371 am_modif_voie_esp boolean,
372 am_plant_voie_esp boolean,
373 am_chem_ouv_esp boolean,
374 am_agri_peche boolean,
375 am_crea_voie boolean,
376 am_modif_voie_exist boolean,
377 am_crea_esp_sauv boolean,
378 am_crea_esp_class boolean,
379 am_projet_desc boolean,
380 am_terr_surf boolean,
381 am_tranche_desc boolean,
382 am_lot_max_nb boolean,
383 am_lot_max_shon boolean,
384 am_lot_cstr_cos boolean,
385 am_lot_cstr_plan boolean,
386 am_lot_cstr_vente boolean,
387 am_lot_fin_diff boolean,
388 am_lot_consign boolean,
389 am_lot_gar_achev boolean,
390 am_lot_vente_ant boolean,
391 am_empl_nb boolean,
392 am_tente_nb boolean,
393 am_carav_nb boolean,
394 am_mobil_nb boolean,
395 am_pers_nb boolean,
396 am_empl_hll_nb boolean,
397 am_hll_shon boolean,
398 am_periode_exploit boolean,
399 am_exist_agrand boolean,
400 am_exist_date boolean,
401 am_exist_num boolean,
402 am_exist_nb_avant boolean,
403 am_exist_nb_apres boolean,
404 am_coupe_bois boolean,
405 am_coupe_parc boolean,
406 am_coupe_align boolean,
407 am_coupe_ess boolean,
408 am_coupe_age boolean,
409 am_coupe_dens boolean,
410 am_coupe_qual boolean,
411 am_coupe_trait boolean,
412 am_coupe_autr boolean,
413 co_archi_recours boolean,
414 co_cstr_nouv boolean,
415 co_cstr_exist boolean,
416 co_cloture boolean,
417 co_elec_tension boolean,
418 co_div_terr boolean,
419 co_projet_desc boolean,
420 co_anx_pisc boolean,
421 co_anx_gara boolean,
422 co_anx_veran boolean,
423 co_anx_abri boolean,
424 co_anx_autr boolean,
425 co_anx_autr_desc boolean,
426 co_tot_log_nb boolean,
427 co_tot_ind_nb boolean,
428 co_tot_coll_nb boolean,
429 co_mais_piece_nb boolean,
430 co_mais_niv_nb boolean,
431 co_fin_lls_nb boolean,
432 co_fin_aa_nb boolean,
433 co_fin_ptz_nb boolean,
434 co_fin_autr_nb boolean,
435 co_fin_autr_desc boolean,
436 co_mais_contrat_ind boolean,
437 co_uti_pers boolean,
438 co_uti_vente boolean,
439 co_uti_loc boolean,
440 co_uti_princ boolean,
441 co_uti_secon boolean,
442 co_resid_agees boolean,
443 co_resid_etud boolean,
444 co_resid_tourism boolean,
445 co_resid_hot_soc boolean,
446 co_resid_soc boolean,
447 co_resid_hand boolean,
448 co_resid_autr boolean,
449 co_resid_autr_desc boolean,
450 co_foyer_chamb_nb boolean,
451 co_log_1p_nb boolean,
452 co_log_2p_nb boolean,
453 co_log_3p_nb boolean,
454 co_log_4p_nb boolean,
455 co_log_5p_nb boolean,
456 co_log_6p_nb boolean,
457 co_bat_niv_nb boolean,
458 co_trx_exten boolean,
459 co_trx_surelev boolean,
460 co_trx_nivsup boolean,
461 co_demont_periode boolean,
462 co_sp_transport boolean,
463 co_sp_enseign boolean,
464 co_sp_act_soc boolean,
465 co_sp_ouvr_spe boolean,
466 co_sp_sante boolean,
467 co_sp_culture boolean,
468 co_statio_avt_nb boolean,
469 co_statio_apr_nb boolean,
470 co_statio_adr boolean,
471 co_statio_place_nb boolean,
472 co_statio_tot_surf boolean,
473 co_statio_tot_shob boolean,
474 co_statio_comm_cin_surf boolean,
475 tab_surface integer,
476 dm_constr_dates boolean,
477 dm_total boolean,
478 dm_partiel boolean,
479 dm_projet_desc boolean,
480 dm_tot_log_nb boolean,
481 tax_surf_tot boolean,
482 tax_surf boolean,
483 tax_surf_suppr_mod boolean,
484 tab_tax_su_princ integer,
485 tab_tax_su_heber integer,
486 tab_tax_su_secon integer,
487 tab_tax_su_tot integer,
488 tax_ext_pret boolean,
489 tax_ext_desc boolean,
490 tax_surf_tax_exist_cons boolean,
491 tax_log_exist_nb boolean,
492 tax_trx_presc_ppr boolean,
493 tax_monu_hist boolean,
494 tax_comm_nb boolean,
495 tab_tax_su_non_habit_surf integer,
496 tab_tax_am integer,
497 vsd_surf_planch_smd boolean,
498 vsd_unit_fonc_sup boolean,
499 vsd_unit_fonc_constr_sup boolean,
500 vsd_val_terr boolean,
501 vsd_const_sxist_non_dem_surf boolean,
502 vsd_rescr_fisc boolean,
503 pld_val_terr boolean,
504 pld_const_exist_dem boolean,
505 pld_const_exist_dem_surf boolean,
506 code_cnil boolean,
507 terr_juri_titul boolean,
508 terr_juri_lot boolean,
509 terr_juri_zac boolean,
510 terr_juri_afu boolean,
511 terr_juri_pup boolean,
512 terr_juri_oin boolean,
513 terr_juri_desc boolean,
514 terr_div_surf_etab boolean,
515 terr_div_surf_av_div boolean,
516 doc_date boolean,
517 doc_tot_trav boolean,
518 doc_tranche_trav boolean,
519 doc_tranche_trav_desc boolean,
520 doc_surf boolean,
521 doc_nb_log boolean,
522 doc_nb_log_indiv boolean,
523 doc_nb_log_coll boolean,
524 doc_nb_log_lls boolean,
525 doc_nb_log_aa boolean,
526 doc_nb_log_ptz boolean,
527 doc_nb_log_autre boolean,
528 daact_date boolean,
529 daact_date_chgmt_dest boolean,
530 daact_tot_trav boolean,
531 daact_tranche_trav boolean,
532 daact_tranche_trav_desc boolean,
533 daact_surf boolean,
534 daact_nb_log boolean,
535 daact_nb_log_indiv boolean,
536 daact_nb_log_coll boolean,
537 daact_nb_log_lls boolean,
538 daact_nb_log_aa boolean,
539 daact_nb_log_ptz boolean,
540 daact_nb_log_autre boolean,
541 am_div_mun boolean,
542 co_perf_energ boolean,
543 architecte boolean
544 );
545
546
547 --
548 -- Name: cerfa_seq; Type: SEQUENCE; Schema: openads; Owner: -
549 --
550
551 CREATE SEQUENCE cerfa_seq
552 START WITH 1
553 INCREMENT BY 1
554 NO MINVALUE
555 NO MAXVALUE
556 CACHE 1;
557
558
559 --
560 -- Name: cerfa_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
561 --
562
563 ALTER SEQUENCE cerfa_seq OWNED BY cerfa.cerfa;
564
565
566 --
567 -- Name: civilite; Type: TABLE; Schema: openads; Owner: -; Tablespace:
568 --
569
570 CREATE TABLE civilite (
571 code character varying(20) NOT NULL,
572 civilite integer NOT NULL,
573 libelle character varying(100),
574 om_validite_debut date,
575 om_validite_fin date
576 );
577
578
579 --
580 -- Name: civilite_seq; Type: SEQUENCE; Schema: openads; Owner: -
581 --
582
583 CREATE SEQUENCE civilite_seq
584 START WITH 1
585 INCREMENT BY 1
586 NO MINVALUE
587 NO MAXVALUE
588 CACHE 1;
589
590
591 --
592 -- Name: civilite_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
593 --
594
595 ALTER SEQUENCE civilite_seq OWNED BY civilite.civilite;
596
597
598 --
599 -- Name: commission; Type: TABLE; Schema: openads; Owner: -; Tablespace:
600 --
601
602 CREATE TABLE commission (
603 commission integer NOT NULL,
604 code character varying(20),
605 commission_type integer NOT NULL,
606 libelle character varying(100),
607 date_commission date NOT NULL,
608 heure_commission character varying(5),
609 lieu_adresse_ligne1 character varying(100),
610 lieu_adresse_ligne2 character varying(100),
611 lieu_salle character varying(100),
612 listes_de_diffusion text,
613 participants text,
614 om_fichier_commission_ordre_jour character varying(64),
615 om_final_commission_ordre_jour boolean,
616 om_fichier_commission_compte_rendu character varying(64),
617 om_final_commission_compte_rendu boolean
618 );
619
620
621 --
622 -- Name: commission_seq; Type: SEQUENCE; Schema: openads; Owner: -
623 --
624
625 CREATE SEQUENCE commission_seq
626 START WITH 1
627 INCREMENT BY 1
628 NO MINVALUE
629 NO MAXVALUE
630 CACHE 1;
631
632
633 --
634 -- Name: commission_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
635 --
636
637 ALTER SEQUENCE commission_seq OWNED BY commission.commission;
638
639
640 --
641 -- Name: commission_type; Type: TABLE; Schema: openads; Owner: -; Tablespace:
642 --
643
644 CREATE TABLE commission_type (
645 commission_type integer NOT NULL,
646 code character varying(10),
647 libelle character varying(100),
648 lieu_adresse_ligne1 character varying(100),
649 lieu_adresse_ligne2 character varying(100),
650 lieu_salle character varying(100),
651 listes_de_diffusion text,
652 participants text,
653 corps_du_courriel text,
654 om_validite_debut date,
655 om_validite_fin date
656 );
657
658
659 --
660 -- Name: commission_type_seq; Type: SEQUENCE; Schema: openads; Owner: -
661 --
662
663 CREATE SEQUENCE commission_type_seq
664 START WITH 1
665 INCREMENT BY 1
666 NO MINVALUE
667 NO MAXVALUE
668 CACHE 1;
669
670
671 --
672 -- Name: commission_type_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
673 --
674
675 ALTER SEQUENCE commission_type_seq OWNED BY commission_type.commission_type;
676
677
678 --
679 -- Name: consultation; Type: TABLE; Schema: openads; Owner: -; Tablespace:
680 --
681
682 CREATE TABLE consultation (
683 consultation integer NOT NULL,
684 dossier character varying(30) NOT NULL,
685 date_envoi date NOT NULL,
686 date_retour date,
687 date_limite date,
688 service integer NOT NULL,
689 avis_consultation integer,
690 date_reception date,
691 motivation text DEFAULT ''::text,
692 fichier character varying(100),
693 lu boolean,
694 code_barres character varying(12),
695 om_fichier_consultation character varying(64),
696 om_final_consultation boolean
697 );
698
699
700 --
701 -- Name: consultation_seq; Type: SEQUENCE; Schema: openads; Owner: -
702 --
703
704 CREATE SEQUENCE consultation_seq
705 START WITH 1
706 INCREMENT BY 1
707 NO MINVALUE
708 NO MAXVALUE
709 CACHE 1;
710
711
712 --
713 -- Name: consultation_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
714 --
715
716 ALTER SEQUENCE consultation_seq OWNED BY consultation.consultation;
717
718
719 --
720 -- Name: demande; Type: TABLE; Schema: openads; Owner: -; Tablespace:
721 --
722
723 CREATE TABLE demande (
724 demande integer NOT NULL,
725 dossier_autorisation_type_detaille integer NOT NULL,
726 demande_type integer NOT NULL,
727 dossier_instruction character varying(30),
728 dossier_autorisation character varying(20),
729 date_demande date NOT NULL,
730 terrain_references_cadastrales character varying(100),
731 terrain_adresse_voie_numero integer,
732 terrain_adresse_voie character varying(30),
733 terrain_adresse_lieu_dit character varying(30),
734 terrain_adresse_localite character varying(30),
735 terrain_adresse_code_postal character varying(5),
736 terrain_adresse_bp character varying(15),
737 terrain_adresse_cedex character varying(15),
738 terrain_superficie double precision,
739 instruction_recepisse integer,
740 arrondissement integer
741 );
742
743
744 --
745 -- Name: demande_nature; Type: TABLE; Schema: openads; Owner: -; Tablespace:
746 --
747
748 CREATE TABLE demande_nature (
749 demande_nature integer NOT NULL,
750 code character varying(20),
751 libelle character varying(100),
752 description text
753 );
754
755
756 --
757 -- Name: demande_nature_seq; Type: SEQUENCE; Schema: openads; Owner: -
758 --
759
760 CREATE SEQUENCE demande_nature_seq
761 START WITH 1
762 INCREMENT BY 1
763 NO MINVALUE
764 NO MAXVALUE
765 CACHE 1;
766
767
768 --
769 -- Name: demande_nature_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
770 --
771
772 ALTER SEQUENCE demande_nature_seq OWNED BY demande_nature.demande_nature;
773
774
775 --
776 -- Name: demande_seq; Type: SEQUENCE; Schema: openads; Owner: -
777 --
778
779 CREATE SEQUENCE demande_seq
780 START WITH 1
781 INCREMENT BY 1
782 NO MINVALUE
783 NO MAXVALUE
784 CACHE 1;
785
786
787 --
788 -- Name: demande_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
789 --
790
791 ALTER SEQUENCE demande_seq OWNED BY demande.demande;
792
793
794 --
795 -- Name: demande_type; Type: TABLE; Schema: openads; Owner: -; Tablespace:
796 --
797
798 CREATE TABLE demande_type (
799 demande_type integer NOT NULL,
800 code character varying(20),
801 libelle character varying(100),
802 description text,
803 demande_nature integer,
804 groupe integer,
805 dossier_instruction_type integer,
806 dossier_autorisation_type_detaille integer,
807 contraintes character varying(20),
808 qualification boolean,
809 evenement integer NOT NULL
810 );
811
812
813 --
814 -- Name: demande_type_seq; Type: SEQUENCE; Schema: openads; Owner: -
815 --
816
817 CREATE SEQUENCE demande_type_seq
818 START WITH 1
819 INCREMENT BY 1
820 NO MINVALUE
821 NO MAXVALUE
822 CACHE 1;
823
824
825 --
826 -- Name: demande_type_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
827 --
828
829 ALTER SEQUENCE demande_type_seq OWNED BY demande_type.demande_type;
830
831
832 --
833 -- Name: demandeur; Type: TABLE; Schema: openads; Owner: -; Tablespace:
834 --
835
836 CREATE TABLE demandeur (
837 demandeur integer NOT NULL,
838 type_demandeur character varying(40),
839 qualite character varying(40),
840 particulier_nom character varying(40),
841 particulier_prenom character varying(40),
842 particulier_date_naissance date,
843 particulier_commune_naissance character varying(30),
844 particulier_departement_naissance character varying(80),
845 personne_morale_denomination character varying(40),
846 personne_morale_raison_sociale character varying(40),
847 personne_morale_siret character varying(15),
848 personne_morale_categorie_juridique character varying(15),
849 personne_morale_nom character varying(40),
850 personne_morale_prenom character varying(40),
851 numero character varying(5),
852 voie character varying(40),
853 complement character varying(39),
854 lieu_dit character varying(39),
855 localite character varying(30),
856 code_postal character varying(5),
857 bp character varying(5),
858 cedex character varying(5),
859 pays character varying(40),
860 division_territoriale character varying(40),
861 telephone_fixe character varying(14),
862 telephone_mobile character varying(14),
863 indicatif character varying(5),
864 courriel character varying(40),
865 notification boolean,
866 frequent boolean,
867 particulier_civilite integer,
868 personne_morale_civilite integer
869 );
870
871
872 --
873 -- Name: demandeur_seq; Type: SEQUENCE; Schema: openads; Owner: -
874 --
875
876 CREATE SEQUENCE demandeur_seq
877 START WITH 1
878 INCREMENT BY 1
879 NO MINVALUE
880 NO MAXVALUE
881 CACHE 1;
882
883
884 --
885 -- Name: demandeur_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
886 --
887
888 ALTER SEQUENCE demandeur_seq OWNED BY demandeur.demandeur;
889
890
891 --
892 -- Name: destination; Type: TABLE; Schema: openads; Owner: -; Tablespace:
893 --
894
895 CREATE TABLE destination (
896 destination character varying(2) NOT NULL,
897 libelle character varying(80) NOT NULL
898 );
899
900
901 --
902 -- Name: destination_seq; Type: SEQUENCE; Schema: openads; Owner: -
903 --
904
905 CREATE SEQUENCE destination_seq
906 START WITH 1
907 INCREMENT BY 1
908 NO MINVALUE
909 NO MAXVALUE
910 CACHE 1;
911
912
913 --
914 -- Name: destination_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
915 --
916
917 ALTER SEQUENCE destination_seq OWNED BY destination.destination;
918
919
920 --
921 -- Name: direction; Type: TABLE; Schema: openads; Owner: -; Tablespace:
922 --
923
924 CREATE TABLE direction (
925 direction integer NOT NULL,
926 code character varying(20) NOT NULL,
927 libelle character varying(100) NOT NULL,
928 description text,
929 chef character varying(100) NOT NULL,
930 om_validite_debut date,
931 om_validite_fin date
932 );
933
934
935 --
936 -- Name: direction_seq; Type: SEQUENCE; Schema: openads; Owner: -
937 --
938
939 CREATE SEQUENCE direction_seq
940 START WITH 1
941 INCREMENT BY 1
942 NO MINVALUE
943 NO MAXVALUE
944 CACHE 1;
945
946
947 --
948 -- Name: direction_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
949 --
950
951 ALTER SEQUENCE direction_seq OWNED BY direction.direction;
952
953
954 --
955 -- Name: division; Type: TABLE; Schema: openads; Owner: -; Tablespace:
956 --
957
958 CREATE TABLE division (
959 division integer NOT NULL,
960 code character varying(20) NOT NULL,
961 libelle character varying(100) NOT NULL,
962 description text,
963 chef character varying(100) NOT NULL,
964 direction integer NOT NULL,
965 om_validite_debut date,
966 om_validite_fin date
967 );
968
969
970 --
971 -- Name: division_seq; Type: SEQUENCE; Schema: openads; Owner: -
972 --
973
974 CREATE SEQUENCE division_seq
975 START WITH 1
976 INCREMENT BY 1
977 NO MINVALUE
978 NO MAXVALUE
979 CACHE 1;
980
981
982 --
983 -- Name: division_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
984 --
985
986 ALTER SEQUENCE division_seq OWNED BY division.division;
987
988
989 --
990 -- Name: document_numerise; Type: TABLE; Schema: openads; Owner: -; Tablespace:
991 --
992
993 CREATE TABLE document_numerise (
994 document_numerise integer NOT NULL,
995 uid character varying(64) NOT NULL,
996 dossier character varying(30) NOT NULL,
997 nom_fichier character varying(255) NOT NULL,
998 date_creation date NOT NULL,
999 document_numerise_type integer NOT NULL
1000 );
1001
1002
1003 --
1004 -- Name: document_numerise_seq; Type: SEQUENCE; Schema: openads; Owner: -
1005 --
1006
1007 CREATE SEQUENCE document_numerise_seq
1008 START WITH 1
1009 INCREMENT BY 1
1010 NO MINVALUE
1011 NO MAXVALUE
1012 CACHE 1;
1013
1014
1015 --
1016 -- Name: document_numerise_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
1017 --
1018
1019 ALTER SEQUENCE document_numerise_seq OWNED BY document_numerise.document_numerise;
1020
1021
1022 --
1023 -- Name: document_numerise_type; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1024 --
1025
1026 CREATE TABLE document_numerise_type (
1027 document_numerise_type integer NOT NULL,
1028 code character varying(6) NOT NULL,
1029 libelle character varying(255) NOT NULL,
1030 document_numerise_type_categorie integer NOT NULL
1031 );
1032
1033
1034 --
1035 -- Name: document_numerise_type_categorie; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1036 --
1037
1038 CREATE TABLE document_numerise_type_categorie (
1039 document_numerise_type_categorie integer NOT NULL,
1040 libelle character varying(255) NOT NULL
1041 );
1042
1043
1044 --
1045 -- Name: document_numerise_type_categorie_seq; Type: SEQUENCE; Schema: openads; Owner: -
1046 --
1047
1048 CREATE SEQUENCE document_numerise_type_categorie_seq
1049 START WITH 1
1050 INCREMENT BY 1
1051 NO MINVALUE
1052 NO MAXVALUE
1053 CACHE 1;
1054
1055
1056 --
1057 -- Name: document_numerise_type_categorie_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
1058 --
1059
1060 ALTER SEQUENCE document_numerise_type_categorie_seq OWNED BY document_numerise_type_categorie.document_numerise_type_categorie;
1061
1062
1063 --
1064 -- Name: document_numerise_type_seq; Type: SEQUENCE; Schema: openads; Owner: -
1065 --
1066
1067 CREATE SEQUENCE document_numerise_type_seq
1068 START WITH 1
1069 INCREMENT BY 1
1070 NO MINVALUE
1071 NO MAXVALUE
1072 CACHE 1;
1073
1074
1075 --
1076 -- Name: document_numerise_type_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
1077 --
1078
1079 ALTER SEQUENCE document_numerise_type_seq OWNED BY document_numerise_type.document_numerise_type;
1080
1081
1082 --
1083 -- Name: donnees_techniques; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1084 --
1085
1086 CREATE TABLE donnees_techniques (
1087 donnees_techniques integer NOT NULL,
1088 dossier_instruction character varying(30),
1089 lot integer,
1090 am_lotiss boolean,
1091 am_autre_div boolean,
1092 am_camping boolean,
1093 am_caravane boolean,
1094 am_carav_duree integer,
1095 am_statio boolean,
1096 am_statio_cont integer,
1097 am_affou_exhau boolean,
1098 am_affou_exhau_sup numeric,
1099 am_affou_prof numeric,
1100 am_exhau_haut numeric,
1101 am_coupe_abat boolean,
1102 am_prot_plu boolean,
1103 am_prot_muni boolean,
1104 am_mobil_voyage boolean,
1105 am_aire_voyage boolean,
1106 am_rememb_afu boolean,
1107 am_parc_resid_loi boolean,
1108 am_sport_moto boolean,
1109 am_sport_attrac boolean,
1110 am_sport_golf boolean,
1111 am_mob_art boolean,
1112 am_modif_voie_esp boolean,
1113 am_plant_voie_esp boolean,
1114 am_chem_ouv_esp boolean,
1115 am_agri_peche boolean,
1116 am_crea_voie boolean,
1117 am_modif_voie_exist boolean,
1118 am_crea_esp_sauv boolean,
1119 am_crea_esp_class boolean,
1120 am_projet_desc text,
1121 am_terr_surf numeric,
1122 am_tranche_desc text,
1123 am_lot_max_nb integer,
1124 am_lot_max_shon numeric,
1125 am_lot_cstr_cos boolean,
1126 am_lot_cstr_plan boolean,
1127 am_lot_cstr_vente boolean,
1128 am_lot_fin_diff boolean,
1129 am_lot_consign boolean,
1130 am_lot_gar_achev boolean,
1131 am_lot_vente_ant boolean,
1132 am_empl_nb integer,
1133 am_tente_nb integer,
1134 am_carav_nb integer,
1135 am_mobil_nb integer,
1136 am_pers_nb integer,
1137 am_empl_hll_nb integer,
1138 am_hll_shon numeric,
1139 am_periode_exploit text,
1140 am_exist_agrand boolean,
1141 am_exist_date date,
1142 am_exist_num character varying(100),
1143 am_exist_nb_avant integer,
1144 am_exist_nb_apres integer,
1145 am_coupe_bois boolean,
1146 am_coupe_parc boolean,
1147 am_coupe_align boolean,
1148 am_coupe_ess character varying(100),
1149 am_coupe_age character varying(15),
1150 am_coupe_dens character varying(100),
1151 am_coupe_qual character varying(100),
1152 am_coupe_trait character varying(100),
1153 am_coupe_autr character varying(100),
1154 co_archi_recours boolean,
1155 co_cstr_nouv boolean,
1156 co_cstr_exist boolean,
1157 co_cloture boolean,
1158 co_elec_tension numeric,
1159 co_div_terr boolean,
1160 co_projet_desc text,
1161 co_anx_pisc boolean,
1162 co_anx_gara boolean,
1163 co_anx_veran boolean,
1164 co_anx_abri boolean,
1165 co_anx_autr boolean,
1166 co_anx_autr_desc text,
1167 co_tot_log_nb integer,
1168 co_tot_ind_nb integer,
1169 co_tot_coll_nb integer,
1170 co_mais_piece_nb integer,
1171 co_mais_niv_nb integer,
1172 co_fin_lls_nb integer,
1173 co_fin_aa_nb integer,
1174 co_fin_ptz_nb integer,
1175 co_fin_autr_nb integer,
1176 co_fin_autr_desc text,
1177 co_mais_contrat_ind boolean,
1178 co_uti_pers boolean,
1179 co_uti_vente boolean,
1180 co_uti_loc boolean,
1181 co_uti_princ boolean,
1182 co_uti_secon boolean,
1183 co_resid_agees boolean,
1184 co_resid_etud boolean,
1185 co_resid_tourism boolean,
1186 co_resid_hot_soc boolean,
1187 co_resid_soc boolean,
1188 co_resid_hand boolean,
1189 co_resid_autr boolean,
1190 co_resid_autr_desc text,
1191 co_foyer_chamb_nb integer,
1192 co_log_1p_nb integer,
1193 co_log_2p_nb integer,
1194 co_log_3p_nb integer,
1195 co_log_4p_nb integer,
1196 co_log_5p_nb integer,
1197 co_log_6p_nb integer,
1198 co_bat_niv_nb integer,
1199 co_trx_exten boolean,
1200 co_trx_surelev boolean,
1201 co_trx_nivsup boolean,
1202 co_demont_periode text,
1203 co_sp_transport boolean,
1204 co_sp_enseign boolean,
1205 co_sp_act_soc boolean,
1206 co_sp_ouvr_spe boolean,
1207 co_sp_sante boolean,
1208 co_sp_culture boolean,
1209 co_statio_avt_nb integer,
1210 co_statio_apr_nb integer,
1211 co_statio_adr text,
1212 co_statio_place_nb integer,
1213 co_statio_tot_surf numeric,
1214 co_statio_tot_shob numeric,
1215 co_statio_comm_cin_surf numeric,
1216 su_avt_shon1 numeric,
1217 su_avt_shon2 numeric,
1218 su_avt_shon3 numeric,
1219 su_avt_shon4 numeric,
1220 su_avt_shon5 numeric,
1221 su_avt_shon6 numeric,
1222 su_avt_shon7 numeric,
1223 su_avt_shon8 numeric,
1224 su_avt_shon9 numeric,
1225 su_cstr_shon1 numeric,
1226 su_cstr_shon2 numeric,
1227 su_cstr_shon3 numeric,
1228 su_cstr_shon4 numeric,
1229 su_cstr_shon5 numeric,
1230 su_cstr_shon6 numeric,
1231 su_cstr_shon7 numeric,
1232 su_cstr_shon8 numeric,
1233 su_cstr_shon9 numeric,
1234 su_trsf_shon1 numeric,
1235 su_trsf_shon2 numeric,
1236 su_trsf_shon3 numeric,
1237 su_trsf_shon4 numeric,
1238 su_trsf_shon5 numeric,
1239 su_trsf_shon6 numeric,
1240 su_trsf_shon7 numeric,
1241 su_trsf_shon8 numeric,
1242 su_trsf_shon9 numeric,
1243 su_chge_shon1 numeric,
1244 su_chge_shon2 numeric,
1245 su_chge_shon3 numeric,
1246 su_chge_shon4 numeric,
1247 su_chge_shon5 numeric,
1248 su_chge_shon6 numeric,
1249 su_chge_shon7 numeric,
1250 su_chge_shon8 numeric,
1251 su_chge_shon9 numeric,
1252 su_demo_shon1 numeric,
1253 su_demo_shon2 numeric,
1254 su_demo_shon3 numeric,
1255 su_demo_shon4 numeric,
1256 su_demo_shon5 numeric,
1257 su_demo_shon6 numeric,
1258 su_demo_shon7 numeric,
1259 su_demo_shon8 numeric,
1260 su_demo_shon9 numeric,
1261 su_sup_shon1 numeric,
1262 su_sup_shon2 numeric,
1263 su_sup_shon3 numeric,
1264 su_sup_shon4 numeric,
1265 su_sup_shon5 numeric,
1266 su_sup_shon6 numeric,
1267 su_sup_shon7 numeric,
1268 su_sup_shon8 numeric,
1269 su_sup_shon9 numeric,
1270 su_tot_shon1 numeric,
1271 su_tot_shon2 numeric,
1272 su_tot_shon3 numeric,
1273 su_tot_shon4 numeric,
1274 su_tot_shon5 numeric,
1275 su_tot_shon6 numeric,
1276 su_tot_shon7 numeric,
1277 su_tot_shon8 numeric,
1278 su_tot_shon9 numeric,
1279 su_avt_shon_tot numeric,
1280 su_cstr_shon_tot numeric,
1281 su_trsf_shon_tot numeric,
1282 su_chge_shon_tot numeric,
1283 su_demo_shon_tot numeric,
1284 su_sup_shon_tot numeric,
1285 su_tot_shon_tot numeric,
1286 dm_constr_dates text,
1287 dm_total boolean,
1288 dm_partiel boolean,
1289 dm_projet_desc text,
1290 dm_tot_log_nb integer,
1291 tax_surf_tot numeric,
1292 tax_surf numeric,
1293 tax_surf_suppr_mod numeric,
1294 tax_su_princ_log_nb1 numeric,
1295 tax_su_princ_log_nb2 numeric,
1296 tax_su_princ_log_nb3 numeric,
1297 tax_su_princ_log_nb4 numeric,
1298 tax_su_princ_log_nb_tot1 numeric,
1299 tax_su_princ_log_nb_tot2 numeric,
1300 tax_su_princ_log_nb_tot3 numeric,
1301 tax_su_princ_log_nb_tot4 numeric,
1302 tax_su_princ_surf1 numeric,
1303 tax_su_princ_surf2 numeric,
1304 tax_su_princ_surf3 numeric,
1305 tax_su_princ_surf4 numeric,
1306 tax_su_princ_surf_sup1 numeric,
1307 tax_su_princ_surf_sup2 numeric,
1308 tax_su_princ_surf_sup3 numeric,
1309 tax_su_princ_surf_sup4 numeric,
1310 tax_su_heber_log_nb1 integer,
1311 tax_su_heber_log_nb2 integer,
1312 tax_su_heber_log_nb3 integer,
1313 tax_su_heber_log_nb_tot1 integer,
1314 tax_su_heber_log_nb_tot2 integer,
1315 tax_su_heber_log_nb_tot3 integer,
1316 tax_su_heber_surf1 numeric,
1317 tax_su_heber_surf2 numeric,
1318 tax_su_heber_surf3 numeric,
1319 tax_su_heber_surf_sup1 numeric,
1320 tax_su_heber_surf_sup2 numeric,
1321 tax_su_heber_surf_sup3 numeric,
1322 tax_su_secon_log_nb integer,
1323 tax_su_tot_log_nb integer,
1324 tax_su_secon_log_nb_tot integer,
1325 tax_su_tot_log_nb_tot integer,
1326 tax_su_secon_surf numeric,
1327 tax_su_tot_surf numeric,
1328 tax_su_secon_surf_sup numeric,
1329 tax_su_tot_surf_sup numeric,
1330 tax_ext_pret boolean,
1331 tax_ext_desc text,
1332 tax_surf_tax_exist_cons numeric,
1333 tax_log_exist_nb integer,
1334 tax_am_statio_ext integer,
1335 tax_sup_bass_pisc numeric,
1336 tax_empl_ten_carav_mobil_nb integer,
1337 tax_empl_hll_nb integer,
1338 tax_eol_haut_nb integer,
1339 tax_pann_volt_sup numeric,
1340 tax_am_statio_ext_sup integer,
1341 tax_sup_bass_pisc_sup numeric,
1342 tax_empl_ten_carav_mobil_nb_sup integer,
1343 tax_empl_hll_nb_sup integer,
1344 tax_eol_haut_nb_sup integer,
1345 tax_pann_volt_sup_sup numeric,
1346 tax_trx_presc_ppr boolean,
1347 tax_monu_hist boolean,
1348 tax_comm_nb integer,
1349 tax_su_non_habit_surf1 numeric,
1350 tax_su_non_habit_surf2 numeric,
1351 tax_su_non_habit_surf3 numeric,
1352 tax_su_non_habit_surf4 numeric,
1353 tax_su_non_habit_surf5 numeric,
1354 tax_su_non_habit_surf6 numeric,
1355 tax_su_non_habit_surf7 numeric,
1356 tax_su_non_habit_surf_sup1 numeric,
1357 tax_su_non_habit_surf_sup2 numeric,
1358 tax_su_non_habit_surf_sup3 numeric,
1359 tax_su_non_habit_surf_sup4 numeric,
1360 tax_su_non_habit_surf_sup5 numeric,
1361 tax_su_non_habit_surf_sup6 numeric,
1362 tax_su_non_habit_surf_sup7 numeric,
1363 vsd_surf_planch_smd boolean,
1364 vsd_unit_fonc_sup numeric,
1365 vsd_unit_fonc_constr_sup numeric,
1366 vsd_val_terr numeric,
1367 vsd_const_sxist_non_dem_surf numeric,
1368 vsd_rescr_fisc date,
1369 pld_val_terr numeric,
1370 pld_const_exist_dem boolean,
1371 pld_const_exist_dem_surf numeric,
1372 code_cnil boolean,
1373 terr_juri_titul character varying(20),
1374 terr_juri_lot character varying(20),
1375 terr_juri_zac character varying(20),
1376 terr_juri_afu character varying(20),
1377 terr_juri_pup character varying(20),
1378 terr_juri_oin character varying(20),
1379 terr_juri_desc text,
1380 terr_div_surf_etab numeric,
1381 terr_div_surf_av_div numeric,
1382 doc_date date,
1383 doc_tot_trav boolean,
1384 doc_tranche_trav boolean,
1385 doc_tranche_trav_desc text,
1386 doc_surf numeric,
1387 doc_nb_log integer,
1388 doc_nb_log_indiv integer,
1389 doc_nb_log_coll integer,
1390 doc_nb_log_lls integer,
1391 doc_nb_log_aa integer,
1392 doc_nb_log_ptz integer,
1393 doc_nb_log_autre integer,
1394 daact_date date,
1395 daact_date_chgmt_dest date,
1396 daact_tot_trav boolean,
1397 daact_tranche_trav boolean,
1398 daact_tranche_trav_desc text,
1399 daact_surf numeric,
1400 daact_nb_log integer,
1401 daact_nb_log_indiv integer,
1402 daact_nb_log_coll integer,
1403 daact_nb_log_lls integer,
1404 daact_nb_log_aa integer,
1405 daact_nb_log_ptz integer,
1406 daact_nb_log_autre integer,
1407 dossier_autorisation character varying(20),
1408 am_div_mun boolean,
1409 co_perf_energ character varying(40),
1410 architecte integer
1411 );
1412
1413
1414 --
1415 -- Name: donnees_techniques_seq; Type: SEQUENCE; Schema: openads; Owner: -
1416 --
1417
1418 CREATE SEQUENCE donnees_techniques_seq
1419 START WITH 1
1420 INCREMENT BY 1
1421 NO MINVALUE
1422 NO MAXVALUE
1423 CACHE 1;
1424
1425
1426 --
1427 -- Name: donnees_techniques_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
1428 --
1429
1430 ALTER SEQUENCE donnees_techniques_seq OWNED BY donnees_techniques.donnees_techniques;
1431
1432
1433 SET default_with_oids = true;
1434
1435 --
1436 -- Name: dossier; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1437 --
1438
1439 CREATE TABLE dossier (
1440 dossier character varying(30) NOT NULL,
1441 annee character(2) DEFAULT ''::bpchar NOT NULL,
1442 etat character varying(20),
1443 instructeur integer,
1444 date_demande date,
1445 date_depot date NOT NULL,
1446 date_complet date,
1447 date_rejet date,
1448 date_notification_delai date,
1449 delai integer DEFAULT 0 NOT NULL,
1450 date_limite date,
1451 accord_tacite character(3) DEFAULT ''::bpchar NOT NULL,
1452 date_decision date,
1453 date_validite date,
1454 date_chantier date,
1455 date_achevement date,
1456 date_conformite date,
1457 parcelle character varying(20),
1458 pos character varying(10),
1459 sig character varying(3) DEFAULT ''::character varying NOT NULL,
1460 batiment_nombre integer,
1461 logement_nombre integer,
1462 shon double precision,
1463 shon_calcul double precision,
1464 shob double precision,
1465 lot integer,
1466 hauteur double precision,
1467 piece_nombre integer,
1468 amenagement character varying(12) DEFAULT ''::character varying NOT NULL,
1469 parcelle_lot integer,
1470 parcelle_lot_lotissement character varying(60) DEFAULT ''::character varying NOT NULL,
1471 description text DEFAULT ''::text NOT NULL,
1472 temp1 character varying(100) DEFAULT ''::character varying NOT NULL,
1473 temp2 character varying(100) DEFAULT ''::character varying NOT NULL,
1474 temp3 character varying(100) DEFAULT ''::character varying NOT NULL,
1475 temp4 character varying(100) DEFAULT ''::character varying NOT NULL,
1476 temp5 character varying(100) DEFAULT ''::character varying NOT NULL,
1477 servitude text,
1478 erp boolean,
1479 avis_decision integer,
1480 enjeu_erp boolean,
1481 enjeu_urba boolean,
1482 division integer,
1483 autorite_competente integer,
1484 a_qualifier boolean,
1485 terrain_references_cadastrales character varying(100),
1486 terrain_adresse_voie_numero integer,
1487 terrain_adresse_voie character varying(30),
1488 terrain_adresse_lieu_dit character varying(30),
1489 terrain_adresse_localite character varying(30),
1490 terrain_adresse_code_postal character varying(5),
1491 terrain_adresse_bp character varying(15),
1492 terrain_adresse_cedex character varying(15),
1493 terrain_superficie double precision,
1494 dossier_autorisation character varying(20) NOT NULL,
1495 dossier_instruction_type integer NOT NULL,
1496 date_dernier_depot date NOT NULL,
1497 version integer,
1498 incompletude boolean DEFAULT false NOT NULL,
1499 evenement_suivant_tacite integer,
1500 evenement_suivant_tacite_incompletude integer,
1501 etat_pendant_incompletude character varying(20),
1502 date_limite_incompletude date,
1503 delai_incompletude integer,
1504 geom text,
1505 geom1 text,
1506 dossier_libelle character varying(25),
1507 numero_versement_archive character varying(100),
1508 duree_validite integer DEFAULT 0 NOT NULL
1509 );
1510
1511
1512 --
1513 -- Name: dossier_at_seq; Type: SEQUENCE; Schema: openads; Owner: -
1514 --
1515
1516 CREATE SEQUENCE dossier_at_seq
1517 START WITH 1
1518 INCREMENT BY 1
1519 NO MINVALUE
1520 NO MAXVALUE
1521 CACHE 1;
1522
1523
1524 SET default_with_oids = false;
1525
1526 --
1527 -- Name: dossier_autorisation; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1528 --
1529
1530 CREATE TABLE dossier_autorisation (
1531 dossier_autorisation character varying(20) NOT NULL,
1532 dossier_autorisation_type_detaille integer,
1533 exercice integer,
1534 insee integer,
1535 terrain_references_cadastrales character varying(100),
1536 terrain_adresse_voie_numero integer,
1537 terrain_adresse_voie character varying(30),
1538 terrain_adresse_lieu_dit character varying(30),
1539 terrain_adresse_localite character varying(30),
1540 terrain_adresse_code_postal character varying(5),
1541 terrain_adresse_bp character varying(15),
1542 terrain_adresse_cedex character varying(15),
1543 terrain_superficie double precision,
1544 arrondissement integer,
1545 depot_initial date,
1546 erp_numero_batiment integer,
1547 erp_ouvert boolean,
1548 erp_date_ouverture date,
1549 erp_arrete_decision boolean,
1550 erp_date_arrete_decision date,
1551 numero_version integer DEFAULT 0,
1552 etat_dossier_autorisation integer,
1553 date_depot date,
1554 date_decision date,
1555 date_validite date,
1556 date_chantier date,
1557 date_achevement date,
1558 avis_decision integer,
1559 etat_dernier_dossier_instruction_accepte integer,
1560 dossier_autorisation_libelle character varying(20)
1561 );
1562
1563
1564 --
1565 -- Name: dossier_autorisation_type; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1566 --
1567
1568 CREATE TABLE dossier_autorisation_type (
1569 dossier_autorisation_type integer NOT NULL,
1570 code character varying(20) NOT NULL,
1571 libelle character varying(100),
1572 description text,
1573 confidentiel boolean DEFAULT false,
1574 groupe integer
1575 );
1576
1577
1578 --
1579 -- Name: dossier_autorisation_type_detaille; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1580 --
1581
1582 CREATE TABLE dossier_autorisation_type_detaille (
1583 dossier_autorisation_type_detaille integer NOT NULL,
1584 code character varying(20),
1585 libelle character varying(100),
1586 description text,
1587 dossier_autorisation_type integer NOT NULL,
1588 cerfa integer,
1589 cerfa_lot integer,
1590 duree_validite_parametrage integer DEFAULT 0 NOT NULL
1591 );
1592
1593
1594 --
1595 -- Name: dossier_autorisation_type_detaille_seq; Type: SEQUENCE; Schema: openads; Owner: -
1596 --
1597
1598 CREATE SEQUENCE dossier_autorisation_type_detaille_seq
1599 START WITH 1
1600 INCREMENT BY 1
1601 NO MINVALUE
1602 NO MAXVALUE
1603 CACHE 1;
1604
1605
1606 --
1607 -- Name: dossier_autorisation_type_detaille_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
1608 --
1609
1610 ALTER SEQUENCE dossier_autorisation_type_detaille_seq OWNED BY dossier_autorisation_type_detaille.dossier_autorisation_type_detaille;
1611
1612
1613 --
1614 -- Name: dossier_autorisation_type_seq; Type: SEQUENCE; Schema: openads; Owner: -
1615 --
1616
1617 CREATE SEQUENCE dossier_autorisation_type_seq
1618 START WITH 1
1619 INCREMENT BY 1
1620 NO MINVALUE
1621 NO MAXVALUE
1622 CACHE 1;
1623
1624
1625 --
1626 -- Name: dossier_autorisation_type_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
1627 --
1628
1629 ALTER SEQUENCE dossier_autorisation_type_seq OWNED BY dossier_autorisation_type.dossier_autorisation_type;
1630
1631
1632 --
1633 -- Name: dossier_az_seq; Type: SEQUENCE; Schema: openads; Owner: -
1634 --
1635
1636 CREATE SEQUENCE dossier_az_seq
1637 START WITH 1
1638 INCREMENT BY 1
1639 NO MINVALUE
1640 NO MAXVALUE
1641 CACHE 1;
1642
1643
1644 --
1645 -- Name: dossier_commission; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1646 --
1647
1648 CREATE TABLE dossier_commission (
1649 dossier_commission integer NOT NULL,
1650 dossier character varying(30) NOT NULL,
1651 commission_type integer NOT NULL,
1652 date_souhaitee date NOT NULL,
1653 motivation text,
1654 commission integer,
1655 avis text,
1656 lu boolean DEFAULT false
1657 );
1658
1659
1660 --
1661 -- Name: dossier_commission_seq; Type: SEQUENCE; Schema: openads; Owner: -
1662 --
1663
1664 CREATE SEQUENCE dossier_commission_seq
1665 START WITH 1
1666 INCREMENT BY 1
1667 NO MINVALUE
1668 NO MAXVALUE
1669 CACHE 1;
1670
1671
1672 --
1673 -- Name: dossier_commission_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
1674 --
1675
1676 ALTER SEQUENCE dossier_commission_seq OWNED BY dossier_commission.dossier_commission;
1677
1678
1679 --
1680 -- Name: dossier_cu_seq; Type: SEQUENCE; Schema: openads; Owner: -
1681 --
1682
1683 CREATE SEQUENCE dossier_cu_seq
1684 START WITH 1
1685 INCREMENT BY 1
1686 NO MINVALUE
1687 NO MAXVALUE
1688 CACHE 1;
1689
1690
1691 --
1692 -- Name: dossier_dat_seq; Type: SEQUENCE; Schema: openads; Owner: -
1693 --
1694
1695 CREATE SEQUENCE dossier_dat_seq
1696 START WITH 1
1697 INCREMENT BY 1
1698 NO MINVALUE
1699 NO MAXVALUE
1700 CACHE 1;
1701
1702
1703 --
1704 -- Name: dossier_dp_seq; Type: SEQUENCE; Schema: openads; Owner: -
1705 --
1706
1707 CREATE SEQUENCE dossier_dp_seq
1708 START WITH 1
1709 INCREMENT BY 1
1710 NO MINVALUE
1711 NO MAXVALUE
1712 CACHE 1;
1713
1714
1715 --
1716 -- Name: dossier_instruction_type; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1717 --
1718
1719 CREATE TABLE dossier_instruction_type (
1720 dossier_instruction_type integer NOT NULL,
1721 code character varying(20),
1722 libelle character varying(100),
1723 description text,
1724 dossier_autorisation_type_detaille integer NOT NULL,
1725 suffixe boolean DEFAULT false,
1726 mouvement_sitadel character varying(20)
1727 );
1728
1729
1730 --
1731 -- Name: dossier_instruction_type_seq; Type: SEQUENCE; Schema: openads; Owner: -
1732 --
1733
1734 CREATE SEQUENCE dossier_instruction_type_seq
1735 START WITH 1
1736 INCREMENT BY 1
1737 NO MINVALUE
1738 NO MAXVALUE
1739 CACHE 1;
1740
1741
1742 --
1743 -- Name: dossier_instruction_type_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
1744 --
1745
1746 ALTER SEQUENCE dossier_instruction_type_seq OWNED BY dossier_instruction_type.dossier_instruction_type;
1747
1748
1749 --
1750 -- Name: dossier_message; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1751 --
1752
1753 CREATE TABLE dossier_message (
1754 dossier_message integer NOT NULL,
1755 dossier character varying(30),
1756 type character varying(60),
1757 emetteur character varying(40),
1758 date_emission timestamp without time zone NOT NULL,
1759 lu boolean DEFAULT false,
1760 contenu text
1761 );
1762
1763
1764 --
1765 -- Name: dossier_message_seq; Type: SEQUENCE; Schema: openads; Owner: -
1766 --
1767
1768 CREATE SEQUENCE dossier_message_seq
1769 START WITH 1
1770 INCREMENT BY 1
1771 NO MINVALUE
1772 NO MAXVALUE
1773 CACHE 1;
1774
1775
1776 --
1777 -- Name: dossier_message_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
1778 --
1779
1780 ALTER SEQUENCE dossier_message_seq OWNED BY dossier_message.dossier_message;
1781
1782
1783 --
1784 -- Name: dossier_pa_seq; Type: SEQUENCE; Schema: openads; Owner: -
1785 --
1786
1787 CREATE SEQUENCE dossier_pa_seq
1788 START WITH 1
1789 INCREMENT BY 1
1790 NO MINVALUE
1791 NO MAXVALUE
1792 CACHE 1;
1793
1794
1795 --
1796 -- Name: dossier_pc_seq; Type: SEQUENCE; Schema: openads; Owner: -
1797 --
1798
1799 CREATE SEQUENCE dossier_pc_seq
1800 START WITH 1
1801 INCREMENT BY 1
1802 NO MINVALUE
1803 NO MAXVALUE
1804 CACHE 1;
1805
1806
1807 --
1808 -- Name: dossier_pca_seq; Type: SEQUENCE; Schema: openads; Owner: -
1809 --
1810
1811 CREATE SEQUENCE dossier_pca_seq
1812 START WITH 1
1813 INCREMENT BY 1
1814 NO MINVALUE
1815 NO MAXVALUE
1816 CACHE 1;
1817
1818
1819 --
1820 -- Name: dossier_pci_seq; Type: SEQUENCE; Schema: openads; Owner: -
1821 --
1822
1823 CREATE SEQUENCE dossier_pci_seq
1824 START WITH 1
1825 INCREMENT BY 1
1826 NO MINVALUE
1827 NO MAXVALUE
1828 CACHE 1;
1829
1830
1831 --
1832 -- Name: dossier_pd_seq; Type: SEQUENCE; Schema: openads; Owner: -
1833 --
1834
1835 CREATE SEQUENCE dossier_pd_seq
1836 START WITH 1
1837 INCREMENT BY 1
1838 NO MINVALUE
1839 NO MAXVALUE
1840 CACHE 1;
1841
1842
1843 --
1844 -- Name: etat; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1845 --
1846
1847 CREATE TABLE etat (
1848 etat character varying(20) NOT NULL,
1849 libelle character varying(50) NOT NULL,
1850 statut character varying(60)
1851 );
1852
1853
1854 --
1855 -- Name: etat_dossier_autorisation; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1856 --
1857
1858 CREATE TABLE etat_dossier_autorisation (
1859 etat_dossier_autorisation integer NOT NULL,
1860 libelle character varying(100)
1861 );
1862
1863
1864 --
1865 -- Name: etat_dossier_autorisation_seq; Type: SEQUENCE; Schema: openads; Owner: -
1866 --
1867
1868 CREATE SEQUENCE etat_dossier_autorisation_seq
1869 START WITH 1
1870 INCREMENT BY 1
1871 NO MINVALUE
1872 NO MAXVALUE
1873 CACHE 1;
1874
1875
1876 --
1877 -- Name: etat_dossier_autorisation_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
1878 --
1879
1880 ALTER SEQUENCE etat_dossier_autorisation_seq OWNED BY etat_dossier_autorisation.etat_dossier_autorisation;
1881
1882
1883 --
1884 -- Name: evenement; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1885 --
1886
1887 CREATE TABLE evenement (
1888 evenement integer NOT NULL,
1889 libelle character varying(70) NOT NULL,
1890 action character varying(20),
1891 etat character varying(20),
1892 delai integer,
1893 accord_tacite character(3) DEFAULT ''::bpchar NOT NULL,
1894 delai_notification integer,
1895 lettretype character varying(60) DEFAULT ''::character varying NOT NULL,
1896 consultation character(3) DEFAULT ''::bpchar NOT NULL,
1897 avis_decision integer,
1898 restriction character varying(60),
1899 type character varying(100),
1900 evenement_retour_ar integer,
1901 evenement_suivant_tacite integer,
1902 evenement_retour_signature integer,
1903 autorite_competente integer
1904 );
1905
1906
1907 --
1908 -- Name: evenement_seq; Type: SEQUENCE; Schema: openads; Owner: -
1909 --
1910
1911 CREATE SEQUENCE evenement_seq
1912 START WITH 1
1913 INCREMENT BY 1
1914 NO MINVALUE
1915 NO MAXVALUE
1916 CACHE 1;
1917
1918
1919 --
1920 -- Name: evenement_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
1921 --
1922
1923 ALTER SEQUENCE evenement_seq OWNED BY evenement.evenement;
1924
1925
1926 --
1927 -- Name: genre; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1928 --
1929
1930 CREATE TABLE genre (
1931 genre integer NOT NULL,
1932 code character varying(20),
1933 libelle character varying(100),
1934 description text
1935 );
1936
1937
1938 --
1939 -- Name: genre_seq; Type: SEQUENCE; Schema: openads; Owner: -
1940 --
1941
1942 CREATE SEQUENCE genre_seq
1943 START WITH 1
1944 INCREMENT BY 1
1945 NO MINVALUE
1946 NO MAXVALUE
1947 CACHE 1;
1948
1949
1950 --
1951 -- Name: genre_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
1952 --
1953
1954 ALTER SEQUENCE genre_seq OWNED BY genre.genre;
1955
1956
1957 --
1958 -- Name: groupe; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1959 --
1960
1961 CREATE TABLE groupe (
1962 groupe integer NOT NULL,
1963 code character varying(20),
1964 libelle character varying(100),
1965 description text,
1966 genre integer NOT NULL
1967 );
1968
1969
1970 --
1971 -- Name: groupe_seq; Type: SEQUENCE; Schema: openads; Owner: -
1972 --
1973
1974 CREATE SEQUENCE groupe_seq
1975 START WITH 1
1976 INCREMENT BY 1
1977 NO MINVALUE
1978 NO MAXVALUE
1979 CACHE 1;
1980
1981
1982 --
1983 -- Name: groupe_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
1984 --
1985
1986 ALTER SEQUENCE groupe_seq OWNED BY groupe.groupe;
1987
1988
1989 --
1990 -- Name: instructeur; Type: TABLE; Schema: openads; Owner: -; Tablespace:
1991 --
1992
1993 CREATE TABLE instructeur (
1994 instructeur integer NOT NULL,
1995 nom character varying(100) NOT NULL,
1996 telephone character varying(14),
1997 division integer NOT NULL,
1998 om_utilisateur integer,
1999 om_validite_debut date,
2000 om_validite_fin date
2001 );
2002
2003
2004 --
2005 -- Name: instructeur_seq; Type: SEQUENCE; Schema: openads; Owner: -
2006 --
2007
2008 CREATE SEQUENCE instructeur_seq
2009 START WITH 1
2010 INCREMENT BY 1
2011 NO MINVALUE
2012 NO MAXVALUE
2013 CACHE 1;
2014
2015
2016 --
2017 -- Name: instructeur_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2018 --
2019
2020 ALTER SEQUENCE instructeur_seq OWNED BY instructeur.instructeur;
2021
2022
2023 --
2024 -- Name: instruction; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2025 --
2026
2027 CREATE TABLE instruction (
2028 instruction integer NOT NULL,
2029 destinataire character varying(30) DEFAULT ''::character varying NOT NULL,
2030 date_evenement date NOT NULL,
2031 evenement integer NOT NULL,
2032 lettretype character varying(40) DEFAULT ''::character varying NOT NULL,
2033 complement text,
2034 complement2 text,
2035 dossier character varying(30),
2036 action character varying(20),
2037 delai integer,
2038 etat character varying(20),
2039 accord_tacite character(3) DEFAULT ''::bpchar NOT NULL,
2040 delai_notification integer DEFAULT 0 NOT NULL,
2041 archive_delai bigint DEFAULT (0)::bigint NOT NULL,
2042 archive_date_complet date,
2043 archive_date_rejet date,
2044 archive_date_limite date,
2045 archive_date_notification_delai date,
2046 archive_accord_tacite character(3) DEFAULT ''::bpchar NOT NULL,
2047 archive_etat character varying(20) DEFAULT ''::character varying NOT NULL,
2048 archive_date_decision date,
2049 archive_avis character varying(20) DEFAULT ''::character varying NOT NULL,
2050 archive_date_validite date,
2051 archive_date_achevement date,
2052 archive_date_chantier date,
2053 archive_date_conformite date,
2054 complement3 text,
2055 complement4 text,
2056 complement5 text,
2057 complement6 text,
2058 complement7 text,
2059 complement8 text,
2060 complement9 text,
2061 complement10 text,
2062 complement11 text,
2063 complement12 text,
2064 complement13 text,
2065 complement14 text,
2066 complement15 text,
2067 avis_decision integer,
2068 date_finalisation_courrier date,
2069 date_envoi_signature date,
2070 date_retour_signature date,
2071 date_envoi_rar date,
2072 date_retour_rar date,
2073 date_envoi_controle_legalite date,
2074 date_retour_controle_legalite date,
2075 signataire_arrete integer,
2076 numero_arrete character varying(100),
2077 archive_date_dernier_depot date,
2078 archive_incompletude boolean DEFAULT false NOT NULL,
2079 archive_evenement_suivant_tacite integer,
2080 archive_evenement_suivant_tacite_incompletude integer,
2081 archive_etat_pendant_incompletude character varying(20),
2082 archive_date_limite_incompletude date,
2083 archive_delai_incompletude integer,
2084 code_barres character varying(12),
2085 om_fichier_instruction character varying(64),
2086 om_final_instruction boolean,
2087 document_numerise integer,
2088 archive_autorite_competente integer,
2089 autorite_competente integer,
2090 duree_validite_parametrage integer DEFAULT 0 NOT NULL,
2091 duree_validite integer DEFAULT 0 NOT NULL
2092 );
2093
2094
2095 --
2096 -- Name: instruction_seq; Type: SEQUENCE; Schema: openads; Owner: -
2097 --
2098
2099 CREATE SEQUENCE instruction_seq
2100 START WITH 1
2101 INCREMENT BY 1
2102 NO MINVALUE
2103 NO MAXVALUE
2104 CACHE 1;
2105
2106
2107 --
2108 -- Name: instruction_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2109 --
2110
2111 ALTER SEQUENCE instruction_seq OWNED BY instruction.instruction;
2112
2113
2114 --
2115 -- Name: lien_demande_demandeur; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2116 --
2117
2118 CREATE TABLE lien_demande_demandeur (
2119 lien_demande_demandeur integer NOT NULL,
2120 petitionnaire_principal boolean,
2121 demande integer,
2122 demandeur integer
2123 );
2124
2125
2126 --
2127 -- Name: lien_demande_demandeur_seq; Type: SEQUENCE; Schema: openads; Owner: -
2128 --
2129
2130 CREATE SEQUENCE lien_demande_demandeur_seq
2131 START WITH 1
2132 INCREMENT BY 1
2133 NO MINVALUE
2134 NO MAXVALUE
2135 CACHE 1;
2136
2137
2138 --
2139 -- Name: lien_demande_demandeur_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2140 --
2141
2142 ALTER SEQUENCE lien_demande_demandeur_seq OWNED BY lien_demande_demandeur.lien_demande_demandeur;
2143
2144
2145 --
2146 -- Name: lien_demande_type_etat_dossier_autorisation; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2147 --
2148
2149 CREATE TABLE lien_demande_type_etat_dossier_autorisation (
2150 lien_demande_type_etat_dossier_autorisation integer NOT NULL,
2151 demande_type integer NOT NULL,
2152 etat_dossier_autorisation integer NOT NULL
2153 );
2154
2155
2156 --
2157 -- Name: lien_demande_type_etat_dossier_autorisation_seq; Type: SEQUENCE; Schema: openads; Owner: -
2158 --
2159
2160 CREATE SEQUENCE lien_demande_type_etat_dossier_autorisation_seq
2161 START WITH 1
2162 INCREMENT BY 1
2163 NO MINVALUE
2164 NO MAXVALUE
2165 CACHE 1;
2166
2167
2168 --
2169 -- Name: lien_demande_type_etat_dossier_autorisation_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2170 --
2171
2172 ALTER SEQUENCE lien_demande_type_etat_dossier_autorisation_seq OWNED BY lien_demande_type_etat_dossier_autorisation.lien_demande_type_etat_dossier_autorisation;
2173
2174
2175 --
2176 -- Name: lien_dossier_autorisation_demandeur; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2177 --
2178
2179 CREATE TABLE lien_dossier_autorisation_demandeur (
2180 lien_dossier_autorisation_demandeur integer NOT NULL,
2181 petitionnaire_principal boolean,
2182 dossier_autorisation character varying(20),
2183 demandeur integer
2184 );
2185
2186
2187 --
2188 -- Name: lien_dossier_autorisation_demandeur_seq; Type: SEQUENCE; Schema: openads; Owner: -
2189 --
2190
2191 CREATE SEQUENCE lien_dossier_autorisation_demandeur_seq
2192 START WITH 1
2193 INCREMENT BY 1
2194 NO MINVALUE
2195 NO MAXVALUE
2196 CACHE 1;
2197
2198
2199 --
2200 -- Name: lien_dossier_autorisation_demandeur_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2201 --
2202
2203 ALTER SEQUENCE lien_dossier_autorisation_demandeur_seq OWNED BY lien_dossier_autorisation_demandeur.lien_dossier_autorisation_demandeur;
2204
2205
2206 --
2207 -- Name: lien_dossier_demandeur; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2208 --
2209
2210 CREATE TABLE lien_dossier_demandeur (
2211 lien_dossier_demandeur integer NOT NULL,
2212 petitionnaire_principal boolean,
2213 dossier character varying(30),
2214 demandeur integer
2215 );
2216
2217
2218 --
2219 -- Name: lien_dossier_demandeur_seq; Type: SEQUENCE; Schema: openads; Owner: -
2220 --
2221
2222 CREATE SEQUENCE lien_dossier_demandeur_seq
2223 START WITH 1
2224 INCREMENT BY 1
2225 NO MINVALUE
2226 NO MAXVALUE
2227 CACHE 1;
2228
2229
2230 --
2231 -- Name: lien_dossier_demandeur_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2232 --
2233
2234 ALTER SEQUENCE lien_dossier_demandeur_seq OWNED BY lien_dossier_demandeur.lien_dossier_demandeur;
2235
2236
2237 --
2238 -- Name: lien_dossier_instruction_type_evenement; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2239 --
2240
2241 CREATE TABLE lien_dossier_instruction_type_evenement (
2242 lien_dossier_instruction_type_evenement integer NOT NULL,
2243 dossier_instruction_type integer,
2244 evenement integer
2245 );
2246
2247
2248 --
2249 -- Name: lien_dossier_instruction_type_evenement_seq; Type: SEQUENCE; Schema: openads; Owner: -
2250 --
2251
2252 CREATE SEQUENCE lien_dossier_instruction_type_evenement_seq
2253 START WITH 1
2254 INCREMENT BY 1
2255 NO MINVALUE
2256 NO MAXVALUE
2257 CACHE 1;
2258
2259
2260 --
2261 -- Name: lien_dossier_instruction_type_evenement_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2262 --
2263
2264 ALTER SEQUENCE lien_dossier_instruction_type_evenement_seq OWNED BY lien_dossier_instruction_type_evenement.lien_dossier_instruction_type_evenement;
2265
2266
2267 --
2268 -- Name: lien_evenement_dossier_autorisation_type; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2269 --
2270
2271 CREATE TABLE lien_evenement_dossier_autorisation_type (
2272 lien_evenement_dossier_autorisation_type integer NOT NULL,
2273 evenement integer,
2274 dossier_autorisation_type integer
2275 );
2276
2277
2278 --
2279 -- Name: lien_evenement_dossier_autorisation_type_seq; Type: SEQUENCE; Schema: openads; Owner: -
2280 --
2281
2282 CREATE SEQUENCE lien_evenement_dossier_autorisation_type_seq
2283 START WITH 1
2284 INCREMENT BY 1
2285 NO MINVALUE
2286 NO MAXVALUE
2287 CACHE 1;
2288
2289
2290 --
2291 -- Name: lien_evenement_dossier_autorisation_type_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2292 --
2293
2294 ALTER SEQUENCE lien_evenement_dossier_autorisation_type_seq OWNED BY lien_evenement_dossier_autorisation_type.lien_evenement_dossier_autorisation_type;
2295
2296
2297 --
2298 -- Name: lien_lot_demandeur; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2299 --
2300
2301 CREATE TABLE lien_lot_demandeur (
2302 lien_lot_demandeur integer NOT NULL,
2303 lot integer,
2304 demandeur integer,
2305 petitionnaire_principal boolean
2306 );
2307
2308
2309 --
2310 -- Name: lien_lot_demandeur_seq; Type: SEQUENCE; Schema: openads; Owner: -
2311 --
2312
2313 CREATE SEQUENCE lien_lot_demandeur_seq
2314 START WITH 1
2315 INCREMENT BY 1
2316 NO MINVALUE
2317 NO MAXVALUE
2318 CACHE 1;
2319
2320
2321 --
2322 -- Name: lien_lot_demandeur_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2323 --
2324
2325 ALTER SEQUENCE lien_lot_demandeur_seq OWNED BY lien_lot_demandeur.lien_lot_demandeur;
2326
2327
2328 --
2329 -- Name: lien_service_om_utilisateur; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2330 --
2331
2332 CREATE TABLE lien_service_om_utilisateur (
2333 lien_service_om_utilisateur integer NOT NULL,
2334 om_utilisateur bigint,
2335 service integer
2336 );
2337
2338
2339 --
2340 -- Name: lien_service_om_utilisateur_seq; Type: SEQUENCE; Schema: openads; Owner: -
2341 --
2342
2343 CREATE SEQUENCE lien_service_om_utilisateur_seq
2344 START WITH 1
2345 INCREMENT BY 1
2346 NO MINVALUE
2347 NO MAXVALUE
2348 CACHE 1;
2349
2350
2351 --
2352 -- Name: lien_service_om_utilisateur_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2353 --
2354
2355 ALTER SEQUENCE lien_service_om_utilisateur_seq OWNED BY lien_service_om_utilisateur.lien_service_om_utilisateur;
2356
2357
2358 --
2359 -- Name: lien_service_service_categorie; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2360 --
2361
2362 CREATE TABLE lien_service_service_categorie (
2363 lien_service_service_categorie integer NOT NULL,
2364 service_categorie integer,
2365 service integer
2366 );
2367
2368
2369 --
2370 -- Name: lien_service_service_categorie_seq; Type: SEQUENCE; Schema: openads; Owner: -
2371 --
2372
2373 CREATE SEQUENCE lien_service_service_categorie_seq
2374 START WITH 1
2375 INCREMENT BY 1
2376 NO MINVALUE
2377 NO MAXVALUE
2378 CACHE 1;
2379
2380
2381 --
2382 -- Name: lien_service_service_categorie_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2383 --
2384
2385 ALTER SEQUENCE lien_service_service_categorie_seq OWNED BY lien_service_service_categorie.lien_service_service_categorie;
2386
2387
2388 --
2389 -- Name: lot; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2390 --
2391
2392 CREATE TABLE lot (
2393 lot integer NOT NULL,
2394 libelle character varying(80) NOT NULL,
2395 dossier_autorisation character varying(20),
2396 dossier character varying(30)
2397 );
2398
2399
2400 --
2401 -- Name: lot_seq; Type: SEQUENCE; Schema: openads; Owner: -
2402 --
2403
2404 CREATE SEQUENCE lot_seq
2405 START WITH 1
2406 INCREMENT BY 1
2407 NO MINVALUE
2408 NO MAXVALUE
2409 CACHE 1;
2410
2411
2412 --
2413 -- Name: lot_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2414 --
2415
2416 ALTER SEQUENCE lot_seq OWNED BY lot.lot;
2417
2418
2419 --
2420 -- Name: parametre; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2421 --
2422
2423 CREATE TABLE parametre (
2424 parametre character varying(20) NOT NULL,
2425 libelle character varying(50) NOT NULL,
2426 actif character(3),
2427 sitadel character(3),
2428 longueur_champ integer,
2429 type_champ character varying(20),
2430 valeur_autorisee character varying(50)
2431 );
2432
2433
2434 SET default_with_oids = true;
2435
2436 --
2437 -- Name: parcelle; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2438 --
2439
2440 CREATE TABLE parcelle (
2441 parcelle character varying(20) NOT NULL,
2442 debut character varying(4) DEFAULT ''::character varying NOT NULL,
2443 rivoli character varying(4),
2444 proprietaire character varying(6),
2445 pos character varying(6),
2446 surface double precision,
2447 section character varying(7),
2448 commune character varying(5),
2449 geom text
2450 );
2451
2452
2453 SET default_with_oids = false;
2454
2455 --
2456 -- Name: parcelle_lot; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2457 --
2458
2459 CREATE TABLE parcelle_lot (
2460 parcelle_lot integer NOT NULL,
2461 lotissement character varying(50) NOT NULL,
2462 numero character varying(16),
2463 surface numeric(10,3),
2464 geom text
2465 );
2466
2467
2468 --
2469 -- Name: parcelle_lot_seq; Type: SEQUENCE; Schema: openads; Owner: -
2470 --
2471
2472 CREATE SEQUENCE parcelle_lot_seq
2473 START WITH 1
2474 INCREMENT BY 1
2475 NO MINVALUE
2476 NO MAXVALUE
2477 CACHE 1;
2478
2479
2480 --
2481 -- Name: parcelle_lot_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2482 --
2483
2484 ALTER SEQUENCE parcelle_lot_seq OWNED BY parcelle_lot.parcelle_lot;
2485
2486
2487 --
2488 -- Name: pos; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2489 --
2490
2491 CREATE TABLE pos (
2492 pos character varying(10) NOT NULL,
2493 libelle character varying(40) NOT NULL,
2494 geom text
2495 );
2496
2497
2498 --
2499 -- Name: proprietaire; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2500 --
2501
2502 CREATE TABLE proprietaire (
2503 proprietaire character varying(6) NOT NULL,
2504 nom character varying(36) DEFAULT ''::character varying NOT NULL,
2505 prenom character varying(36) DEFAULT ''::character varying NOT NULL,
2506 adresse1 character varying(36) DEFAULT ''::character varying NOT NULL,
2507 adresse2 character varying(36) DEFAULT ''::character varying NOT NULL,
2508 cp character varying(5) DEFAULT ''::character varying NOT NULL,
2509 ville character varying(36) DEFAULT ''::character varying NOT NULL,
2510 civilite integer
2511 );
2512
2513
2514 --
2515 -- Name: quartier; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2516 --
2517
2518 CREATE TABLE quartier (
2519 quartier integer NOT NULL,
2520 arrondissement integer NOT NULL,
2521 code_impots character varying(3) NOT NULL,
2522 libelle character varying(40) NOT NULL
2523 );
2524
2525
2526 --
2527 -- Name: quartier_seq; Type: SEQUENCE; Schema: openads; Owner: -
2528 --
2529
2530 CREATE SEQUENCE quartier_seq
2531 START WITH 1
2532 INCREMENT BY 1
2533 NO MINVALUE
2534 NO MAXVALUE
2535 CACHE 1;
2536
2537
2538 --
2539 -- Name: quartier_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2540 --
2541
2542 ALTER SEQUENCE quartier_seq OWNED BY quartier.quartier;
2543
2544
2545 --
2546 -- Name: rapport_instruction; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2547 --
2548
2549 CREATE TABLE rapport_instruction (
2550 rapport_instruction integer NOT NULL,
2551 dossier_instruction character varying(30),
2552 analyse_reglementaire text,
2553 description_projet text,
2554 proposition_decision text,
2555 om_fichier_rapport_instruction character varying(64),
2556 om_final_rapport_instruction boolean
2557 );
2558
2559
2560 --
2561 -- Name: rapport_instruction_seq; Type: SEQUENCE; Schema: openads; Owner: -
2562 --
2563
2564 CREATE SEQUENCE rapport_instruction_seq
2565 START WITH 1
2566 INCREMENT BY 1
2567 NO MINVALUE
2568 NO MAXVALUE
2569 CACHE 1;
2570
2571
2572 --
2573 -- Name: rapport_instruction_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2574 --
2575
2576 ALTER SEQUENCE rapport_instruction_seq OWNED BY rapport_instruction.rapport_instruction;
2577
2578
2579 --
2580 -- Name: regle; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2581 --
2582
2583 CREATE TABLE regle (
2584 regle integer NOT NULL,
2585 sens character varying(5) NOT NULL,
2586 ordre integer NOT NULL,
2587 controle character varying(20) DEFAULT ''::character varying NOT NULL,
2588 id integer DEFAULT 0 NOT NULL,
2589 champ character varying(30) NOT NULL,
2590 operateur character(2) NOT NULL,
2591 valeur double precision NOT NULL,
2592 message character varying(80) NOT NULL
2593 );
2594
2595
2596 --
2597 -- Name: regle_seq; Type: SEQUENCE; Schema: openads; Owner: -
2598 --
2599
2600 CREATE SEQUENCE regle_seq
2601 START WITH 1
2602 INCREMENT BY 1
2603 NO MINVALUE
2604 NO MAXVALUE
2605 CACHE 1;
2606
2607
2608 --
2609 -- Name: regle_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2610 --
2611
2612 ALTER SEQUENCE regle_seq OWNED BY regle.regle;
2613
2614
2615 --
2616 -- Name: rivoli; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2617 --
2618
2619 CREATE TABLE rivoli (
2620 rivoli character varying(4) NOT NULL,
2621 libelle character varying(40) NOT NULL
2622 );
2623
2624
2625 --
2626 -- Name: service; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2627 --
2628
2629 CREATE TABLE service (
2630 abrege character varying(5) NOT NULL,
2631 libelle character varying(70) NOT NULL,
2632 adresse character varying(40) DEFAULT ''::character varying NOT NULL,
2633 adresse2 character varying(39) DEFAULT ''::character varying NOT NULL,
2634 cp character varying(5) DEFAULT ''::character varying NOT NULL,
2635 ville character varying(30) DEFAULT ''::character varying NOT NULL,
2636 email character varying(50) DEFAULT ''::character varying NOT NULL,
2637 delai integer,
2638 service integer NOT NULL,
2639 consultation_papier boolean,
2640 notification_email boolean,
2641 om_validite_debut date,
2642 om_validite_fin date,
2643 type_consultation character varying(70) DEFAULT 'avec_avis_attendu'::character varying NOT NULL
2644 );
2645
2646
2647 --
2648 -- Name: service_categorie; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2649 --
2650
2651 CREATE TABLE service_categorie (
2652 service_categorie integer NOT NULL,
2653 libelle character varying(70) DEFAULT ''::character varying NOT NULL
2654 );
2655
2656
2657 --
2658 -- Name: service_categorie_seq; Type: SEQUENCE; Schema: openads; Owner: -
2659 --
2660
2661 CREATE SEQUENCE service_categorie_seq
2662 START WITH 1
2663 INCREMENT BY 1
2664 NO MINVALUE
2665 NO MAXVALUE
2666 CACHE 1;
2667
2668
2669 --
2670 -- Name: service_categorie_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2671 --
2672
2673 ALTER SEQUENCE service_categorie_seq OWNED BY service_categorie.service_categorie;
2674
2675
2676 --
2677 -- Name: service_seq; Type: SEQUENCE; Schema: openads; Owner: -
2678 --
2679
2680 CREATE SEQUENCE service_seq
2681 START WITH 1
2682 INCREMENT BY 1
2683 NO MINVALUE
2684 NO MAXVALUE
2685 CACHE 1;
2686
2687
2688 --
2689 -- Name: service_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2690 --
2691
2692 ALTER SEQUENCE service_seq OWNED BY service.service;
2693
2694
2695 --
2696 -- Name: servitude_ligne; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2697 --
2698
2699 CREATE TABLE servitude_ligne (
2700 servitude_ligne integer NOT NULL,
2701 libelle character varying(20) NOT NULL,
2702 observation character varying(80),
2703 perimetre integer,
2704 description text,
2705 geom text
2706 );
2707
2708
2709 --
2710 -- Name: servitude_ligne_seq; Type: SEQUENCE; Schema: openads; Owner: -
2711 --
2712
2713 CREATE SEQUENCE servitude_ligne_seq
2714 START WITH 1
2715 INCREMENT BY 1
2716 NO MINVALUE
2717 NO MAXVALUE
2718 CACHE 1;
2719
2720
2721 --
2722 -- Name: servitude_ligne_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2723 --
2724
2725 ALTER SEQUENCE servitude_ligne_seq OWNED BY servitude_ligne.servitude_ligne;
2726
2727
2728 --
2729 -- Name: servitude_point; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2730 --
2731
2732 CREATE TABLE servitude_point (
2733 servitude_point integer NOT NULL,
2734 libelle character varying(20) NOT NULL,
2735 observation character varying(80),
2736 perimetre integer,
2737 description text,
2738 geom text
2739 );
2740
2741
2742 --
2743 -- Name: servitude_point_seq; Type: SEQUENCE; Schema: openads; Owner: -
2744 --
2745
2746 CREATE SEQUENCE servitude_point_seq
2747 START WITH 1
2748 INCREMENT BY 1
2749 NO MINVALUE
2750 NO MAXVALUE
2751 CACHE 1;
2752
2753
2754 --
2755 -- Name: servitude_point_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2756 --
2757
2758 ALTER SEQUENCE servitude_point_seq OWNED BY servitude_point.servitude_point;
2759
2760
2761 --
2762 -- Name: servitude_surfacique; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2763 --
2764
2765 CREATE TABLE servitude_surfacique (
2766 servitude_surfacique integer NOT NULL,
2767 libelle character varying(20) NOT NULL,
2768 observation character varying(80),
2769 perimetre integer,
2770 description text,
2771 geom text
2772 );
2773
2774
2775 --
2776 -- Name: servitude_surfacique_seq; Type: SEQUENCE; Schema: openads; Owner: -
2777 --
2778
2779 CREATE SEQUENCE servitude_surfacique_seq
2780 START WITH 1
2781 INCREMENT BY 1
2782 NO MINVALUE
2783 NO MAXVALUE
2784 CACHE 1;
2785
2786
2787 --
2788 -- Name: servitude_surfacique_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2789 --
2790
2791 ALTER SEQUENCE servitude_surfacique_seq OWNED BY servitude_surfacique.servitude_surfacique;
2792
2793
2794 --
2795 -- Name: signataire_arrete; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2796 --
2797
2798 CREATE TABLE signataire_arrete (
2799 signataire_arrete integer NOT NULL,
2800 civilite integer,
2801 nom character varying(80),
2802 prenom character varying(80),
2803 qualite character varying(80),
2804 signature text,
2805 defaut boolean,
2806 om_validite_debut date,
2807 om_validite_fin date
2808 );
2809
2810
2811 --
2812 -- Name: signataire_arrete_seq; Type: SEQUENCE; Schema: openads; Owner: -
2813 --
2814
2815 CREATE SEQUENCE signataire_arrete_seq
2816 START WITH 1
2817 INCREMENT BY 1
2818 NO MINVALUE
2819 NO MAXVALUE
2820 CACHE 1;
2821
2822
2823 --
2824 -- Name: signataire_arrete_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2825 --
2826
2827 ALTER SEQUENCE signataire_arrete_seq OWNED BY signataire_arrete.signataire_arrete;
2828
2829
2830 --
2831 -- Name: terrain; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2832 --
2833
2834 CREATE TABLE terrain (
2835 terrain integer NOT NULL,
2836 dossier character varying(30),
2837 parcelle character varying(20),
2838 nom character varying(60) DEFAULT ''::character varying NOT NULL
2839 );
2840
2841
2842 --
2843 -- Name: terrain_seq; Type: SEQUENCE; Schema: openads; Owner: -
2844 --
2845
2846 CREATE SEQUENCE terrain_seq
2847 START WITH 1
2848 INCREMENT BY 1
2849 NO MINVALUE
2850 NO MAXVALUE
2851 CACHE 1;
2852
2853
2854 --
2855 -- Name: terrain_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2856 --
2857
2858 ALTER SEQUENCE terrain_seq OWNED BY terrain.terrain;
2859
2860
2861 --
2862 -- Name: transition; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2863 --
2864
2865 CREATE TABLE transition (
2866 transition integer NOT NULL,
2867 etat character varying(20) NOT NULL,
2868 evenement integer NOT NULL
2869 );
2870
2871
2872 --
2873 -- Name: transition_seq; Type: SEQUENCE; Schema: openads; Owner: -
2874 --
2875
2876 CREATE SEQUENCE transition_seq
2877 START WITH 1
2878 INCREMENT BY 1
2879 NO MINVALUE
2880 NO MAXVALUE
2881 CACHE 1;
2882
2883
2884 --
2885 -- Name: transition_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2886 --
2887
2888 ALTER SEQUENCE transition_seq OWNED BY transition.transition;
2889
2890
2891 --
2892 -- Name: travaux; Type: TABLE; Schema: openads; Owner: -; Tablespace:
2893 --
2894
2895 CREATE TABLE travaux (
2896 travaux integer NOT NULL,
2897 libelle character varying(80) NOT NULL,
2898 codelascot character(1) DEFAULT ''::bpchar NOT NULL,
2899 solde character(3) DEFAULT ''::bpchar NOT NULL,
2900 dossier_autorisation_type integer
2901 );
2902
2903
2904 --
2905 -- Name: travaux_seq; Type: SEQUENCE; Schema: openads; Owner: -
2906 --
2907
2908 CREATE SEQUENCE travaux_seq
2909 START WITH 1
2910 INCREMENT BY 1
2911 NO MINVALUE
2912 NO MAXVALUE
2913 CACHE 1;
2914
2915
2916 --
2917 -- Name: travaux_seq; Type: SEQUENCE OWNED BY; Schema: openads; Owner: -
2918 --
2919
2920 ALTER SEQUENCE travaux_seq OWNED BY travaux.travaux;
2921
2922
2923 --
2924 -- Name: transition; Type: DEFAULT; Schema: openads; Owner: -
2925 --
2926
2927 ALTER TABLE ONLY transition ALTER COLUMN transition SET DEFAULT nextval('transition_seq'::regclass);
2928
2929
2930 --
2931 -- Name: action_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
2932 --
2933
2934 ALTER TABLE ONLY action
2935 ADD CONSTRAINT action_pkey PRIMARY KEY (action);
2936
2937
2938 --
2939 -- Name: affectation_automatique_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
2940 --
2941
2942 ALTER TABLE ONLY affectation_automatique
2943 ADD CONSTRAINT affectation_automatique_pkey PRIMARY KEY (affectation_automatique);
2944
2945
2946 --
2947 -- Name: architecte_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
2948 --
2949
2950 ALTER TABLE ONLY architecte
2951 ADD CONSTRAINT architecte_pkey PRIMARY KEY (architecte);
2952
2953
2954 --
2955 -- Name: arrondissement_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
2956 --
2957
2958 ALTER TABLE ONLY arrondissement
2959 ADD CONSTRAINT arrondissement_pkey PRIMARY KEY (arrondissement);
2960
2961
2962 --
2963 -- Name: autorite_competente_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
2964 --
2965
2966 ALTER TABLE ONLY autorite_competente
2967 ADD CONSTRAINT autorite_competente_pkey PRIMARY KEY (autorite_competente);
2968
2969
2970 --
2971 -- Name: avis_consultation_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
2972 --
2973
2974 ALTER TABLE ONLY avis_consultation
2975 ADD CONSTRAINT avis_consultation_pkey PRIMARY KEY (avis_consultation);
2976
2977
2978 --
2979 -- Name: avis_decision_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
2980 --
2981
2982 ALTER TABLE ONLY avis_decision
2983 ADD CONSTRAINT avis_decision_pkey PRIMARY KEY (avis_decision);
2984
2985
2986 --
2987 -- Name: bible_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
2988 --
2989
2990 ALTER TABLE ONLY bible
2991 ADD CONSTRAINT bible_pkey PRIMARY KEY (bible);
2992
2993
2994 --
2995 -- Name: blocnote_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
2996 --
2997
2998 ALTER TABLE ONLY blocnote
2999 ADD CONSTRAINT blocnote_pkey PRIMARY KEY (blocnote);
3000
3001
3002 --
3003 -- Name: categorie_demandeur_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3004 --
3005
3006 ALTER TABLE ONLY categorie_demandeur
3007 ADD CONSTRAINT categorie_demandeur_pkey PRIMARY KEY (categorie_demandeur);
3008
3009
3010 --
3011 -- Name: cerfa_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3012 --
3013
3014 ALTER TABLE ONLY cerfa
3015 ADD CONSTRAINT cerfa_pkey PRIMARY KEY (cerfa);
3016
3017
3018 --
3019 -- Name: civilite_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3020 --
3021
3022 ALTER TABLE ONLY civilite
3023 ADD CONSTRAINT civilite_pkey PRIMARY KEY (civilite);
3024
3025
3026 --
3027 -- Name: code_unique; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3028 --
3029
3030 ALTER TABLE ONLY dossier_autorisation_type
3031 ADD CONSTRAINT code_unique UNIQUE (code);
3032
3033
3034 --
3035 -- Name: commission_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3036 --
3037
3038 ALTER TABLE ONLY commission
3039 ADD CONSTRAINT commission_pkey PRIMARY KEY (commission);
3040
3041
3042 --
3043 -- Name: commission_type_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3044 --
3045
3046 ALTER TABLE ONLY commission_type
3047 ADD CONSTRAINT commission_type_pkey PRIMARY KEY (commission_type);
3048
3049
3050 --
3051 -- Name: consultation_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3052 --
3053
3054 ALTER TABLE ONLY consultation
3055 ADD CONSTRAINT consultation_pkey PRIMARY KEY (consultation);
3056
3057
3058 --
3059 -- Name: demande_nature_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3060 --
3061
3062 ALTER TABLE ONLY demande_nature
3063 ADD CONSTRAINT demande_nature_pkey PRIMARY KEY (demande_nature);
3064
3065
3066 --
3067 -- Name: demande_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3068 --
3069
3070 ALTER TABLE ONLY demande
3071 ADD CONSTRAINT demande_pkey PRIMARY KEY (demande);
3072
3073
3074 --
3075 -- Name: demande_type_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3076 --
3077
3078 ALTER TABLE ONLY demande_type
3079 ADD CONSTRAINT demande_type_pkey PRIMARY KEY (demande_type);
3080
3081
3082 --
3083 -- Name: demandeur_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3084 --
3085
3086 ALTER TABLE ONLY demandeur
3087 ADD CONSTRAINT demandeur_pkey PRIMARY KEY (demandeur);
3088
3089
3090 --
3091 -- Name: destination_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3092 --
3093
3094 ALTER TABLE ONLY destination
3095 ADD CONSTRAINT destination_pkey PRIMARY KEY (destination);
3096
3097
3098 --
3099 -- Name: direction_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3100 --
3101
3102 ALTER TABLE ONLY direction
3103 ADD CONSTRAINT direction_pkey PRIMARY KEY (direction);
3104
3105
3106 --
3107 -- Name: division_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3108 --
3109
3110 ALTER TABLE ONLY division
3111 ADD CONSTRAINT division_pkey PRIMARY KEY (division);
3112
3113
3114 --
3115 -- Name: document_numerise_dossier_nom_fichier_key; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3116 --
3117
3118 ALTER TABLE ONLY document_numerise
3119 ADD CONSTRAINT document_numerise_dossier_nom_fichier_key UNIQUE (dossier, nom_fichier);
3120
3121
3122 --
3123 -- Name: document_numerise_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3124 --
3125
3126 ALTER TABLE ONLY document_numerise
3127 ADD CONSTRAINT document_numerise_pkey PRIMARY KEY (document_numerise);
3128
3129
3130 --
3131 -- Name: document_numerise_type_categorie_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3132 --
3133
3134 ALTER TABLE ONLY document_numerise_type_categorie
3135 ADD CONSTRAINT document_numerise_type_categorie_pkey PRIMARY KEY (document_numerise_type_categorie);
3136
3137
3138 --
3139 -- Name: document_numerise_type_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3140 --
3141
3142 ALTER TABLE ONLY document_numerise_type
3143 ADD CONSTRAINT document_numerise_type_pkey PRIMARY KEY (document_numerise_type);
3144
3145
3146 --
3147 -- Name: document_numerise_uid_key; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3148 --
3149
3150 ALTER TABLE ONLY document_numerise
3151 ADD CONSTRAINT document_numerise_uid_key UNIQUE (uid);
3152
3153
3154 --
3155 -- Name: donnees_techniques_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3156 --
3157
3158 ALTER TABLE ONLY donnees_techniques
3159 ADD CONSTRAINT donnees_techniques_pkey PRIMARY KEY (donnees_techniques);
3160
3161
3162 --
3163 -- Name: dossier_autorisation_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3164 --
3165
3166 ALTER TABLE ONLY dossier_autorisation
3167 ADD CONSTRAINT dossier_autorisation_pkey PRIMARY KEY (dossier_autorisation);
3168
3169
3170 --
3171 -- Name: dossier_autorisation_type_detaille_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3172 --
3173
3174 ALTER TABLE ONLY dossier_autorisation_type_detaille
3175 ADD CONSTRAINT dossier_autorisation_type_detaille_pkey PRIMARY KEY (dossier_autorisation_type_detaille);
3176
3177
3178 --
3179 -- Name: dossier_autorisation_type_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3180 --
3181
3182 ALTER TABLE ONLY dossier_autorisation_type
3183 ADD CONSTRAINT dossier_autorisation_type_pkey PRIMARY KEY (dossier_autorisation_type);
3184
3185
3186 --
3187 -- Name: dossier_commission_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3188 --
3189
3190 ALTER TABLE ONLY dossier_commission
3191 ADD CONSTRAINT dossier_commission_pkey PRIMARY KEY (dossier_commission);
3192
3193
3194 --
3195 -- Name: dossier_instruction_type_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3196 --
3197
3198 ALTER TABLE ONLY dossier_instruction_type
3199 ADD CONSTRAINT dossier_instruction_type_pkey PRIMARY KEY (dossier_instruction_type);
3200
3201
3202 --
3203 -- Name: dossier_message_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3204 --
3205
3206 ALTER TABLE ONLY dossier_message
3207 ADD CONSTRAINT dossier_message_pkey PRIMARY KEY (dossier_message);
3208
3209
3210 --
3211 -- Name: dossier_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3212 --
3213
3214 ALTER TABLE ONLY dossier
3215 ADD CONSTRAINT dossier_pkey PRIMARY KEY (dossier);
3216
3217
3218 --
3219 -- Name: etat_dossier_autorisation_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3220 --
3221
3222 ALTER TABLE ONLY etat_dossier_autorisation
3223 ADD CONSTRAINT etat_dossier_autorisation_pkey PRIMARY KEY (etat_dossier_autorisation);
3224
3225
3226 --
3227 -- Name: etat_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3228 --
3229
3230 ALTER TABLE ONLY etat
3231 ADD CONSTRAINT etat_pkey PRIMARY KEY (etat);
3232
3233
3234 --
3235 -- Name: evenement_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3236 --
3237
3238 ALTER TABLE ONLY evenement
3239 ADD CONSTRAINT evenement_pkey PRIMARY KEY (evenement);
3240
3241
3242 --
3243 -- Name: genre_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3244 --
3245
3246 ALTER TABLE ONLY genre
3247 ADD CONSTRAINT genre_pkey PRIMARY KEY (genre);
3248
3249
3250 --
3251 -- Name: groupe_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3252 --
3253
3254 ALTER TABLE ONLY groupe
3255 ADD CONSTRAINT groupe_pkey PRIMARY KEY (groupe);
3256
3257
3258 --
3259 -- Name: instructeur_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3260 --
3261
3262 ALTER TABLE ONLY instructeur
3263 ADD CONSTRAINT instructeur_pkey PRIMARY KEY (instructeur);
3264
3265
3266 --
3267 -- Name: instruction_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3268 --
3269
3270 ALTER TABLE ONLY instruction
3271 ADD CONSTRAINT instruction_pkey PRIMARY KEY (instruction);
3272
3273
3274 --
3275 -- Name: lien_demande_demandeur_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3276 --
3277
3278 ALTER TABLE ONLY lien_demande_demandeur
3279 ADD CONSTRAINT lien_demande_demandeur_pkey PRIMARY KEY (lien_demande_demandeur);
3280
3281
3282 --
3283 -- Name: lien_demande_type_etat_dossier_autorisation_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3284 --
3285
3286 ALTER TABLE ONLY lien_demande_type_etat_dossier_autorisation
3287 ADD CONSTRAINT lien_demande_type_etat_dossier_autorisation_pkey PRIMARY KEY (lien_demande_type_etat_dossier_autorisation);
3288
3289
3290 --
3291 -- Name: lien_dossier_autorisation_demandeur_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3292 --
3293
3294 ALTER TABLE ONLY lien_dossier_autorisation_demandeur
3295 ADD CONSTRAINT lien_dossier_autorisation_demandeur_pkey PRIMARY KEY (lien_dossier_autorisation_demandeur);
3296
3297
3298 --
3299 -- Name: lien_dossier_demandeur_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3300 --
3301
3302 ALTER TABLE ONLY lien_dossier_demandeur
3303 ADD CONSTRAINT lien_dossier_demandeur_pkey PRIMARY KEY (lien_dossier_demandeur);
3304
3305
3306 --
3307 -- Name: lien_dossier_instruction_type_evenement_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3308 --
3309
3310 ALTER TABLE ONLY lien_dossier_instruction_type_evenement
3311 ADD CONSTRAINT lien_dossier_instruction_type_evenement_pkey PRIMARY KEY (lien_dossier_instruction_type_evenement);
3312
3313
3314 --
3315 -- Name: lien_evenement_dossier_autorisation_type_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3316 --
3317
3318 ALTER TABLE ONLY lien_evenement_dossier_autorisation_type
3319 ADD CONSTRAINT lien_evenement_dossier_autorisation_type_pkey PRIMARY KEY (lien_evenement_dossier_autorisation_type);
3320
3321
3322 --
3323 -- Name: lien_lot_demandeur_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3324 --
3325
3326 ALTER TABLE ONLY lien_lot_demandeur
3327 ADD CONSTRAINT lien_lot_demandeur_pkey PRIMARY KEY (lien_lot_demandeur);
3328
3329
3330 --
3331 -- Name: lien_service_om_utilisateur_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3332 --
3333
3334 ALTER TABLE ONLY lien_service_om_utilisateur
3335 ADD CONSTRAINT lien_service_om_utilisateur_pkey PRIMARY KEY (lien_service_om_utilisateur);
3336
3337
3338 --
3339 -- Name: lien_service_service_categorie_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3340 --
3341
3342 ALTER TABLE ONLY lien_service_service_categorie
3343 ADD CONSTRAINT lien_service_service_categorie_pkey PRIMARY KEY (lien_service_service_categorie);
3344
3345
3346 --
3347 -- Name: lot_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3348 --
3349
3350 ALTER TABLE ONLY lot
3351 ADD CONSTRAINT lot_pkey PRIMARY KEY (lot);
3352
3353
3354 --
3355 -- Name: parametre_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3356 --
3357
3358 ALTER TABLE ONLY parametre
3359 ADD CONSTRAINT parametre_pkey PRIMARY KEY (parametre);
3360
3361
3362 --
3363 -- Name: parcelle_lot_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3364 --
3365
3366 ALTER TABLE ONLY parcelle_lot
3367 ADD CONSTRAINT parcelle_lot_pkey PRIMARY KEY (parcelle_lot);
3368
3369
3370 --
3371 -- Name: parcelle_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3372 --
3373
3374 ALTER TABLE ONLY parcelle
3375 ADD CONSTRAINT parcelle_pkey PRIMARY KEY (parcelle);
3376
3377
3378 --
3379 -- Name: pos_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3380 --
3381
3382 ALTER TABLE ONLY pos
3383 ADD CONSTRAINT pos_pkey PRIMARY KEY (pos);
3384
3385
3386 --
3387 -- Name: proprietaire_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3388 --
3389
3390 ALTER TABLE ONLY proprietaire
3391 ADD CONSTRAINT proprietaire_pkey PRIMARY KEY (proprietaire);
3392
3393
3394 --
3395 -- Name: quartier_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3396 --
3397
3398 ALTER TABLE ONLY quartier
3399 ADD CONSTRAINT quartier_pkey PRIMARY KEY (quartier);
3400
3401
3402 --
3403 -- Name: rapport_instruction_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3404 --
3405
3406 ALTER TABLE ONLY rapport_instruction
3407 ADD CONSTRAINT rapport_instruction_pkey PRIMARY KEY (rapport_instruction);
3408
3409
3410 --
3411 -- Name: regle_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3412 --
3413
3414 ALTER TABLE ONLY regle
3415 ADD CONSTRAINT regle_pkey PRIMARY KEY (regle);
3416
3417
3418 --
3419 -- Name: rivoli_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3420 --
3421
3422 ALTER TABLE ONLY rivoli
3423 ADD CONSTRAINT rivoli_pkey PRIMARY KEY (rivoli);
3424
3425
3426 --
3427 -- Name: service_categorie_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3428 --
3429
3430 ALTER TABLE ONLY service_categorie
3431 ADD CONSTRAINT service_categorie_pkey PRIMARY KEY (service_categorie);
3432
3433
3434 --
3435 -- Name: service_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3436 --
3437
3438 ALTER TABLE ONLY service
3439 ADD CONSTRAINT service_pkey PRIMARY KEY (service);
3440
3441
3442 --
3443 -- Name: servitude_ligne_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3444 --
3445
3446 ALTER TABLE ONLY servitude_ligne
3447 ADD CONSTRAINT servitude_ligne_pkey PRIMARY KEY (servitude_ligne);
3448
3449
3450 --
3451 -- Name: servitude_point_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3452 --
3453
3454 ALTER TABLE ONLY servitude_point
3455 ADD CONSTRAINT servitude_point_pkey PRIMARY KEY (servitude_point);
3456
3457
3458 --
3459 -- Name: servitude_surfacique_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3460 --
3461
3462 ALTER TABLE ONLY servitude_surfacique
3463 ADD CONSTRAINT servitude_surfacique_pkey PRIMARY KEY (servitude_surfacique);
3464
3465
3466 --
3467 -- Name: signataire_arrete_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3468 --
3469
3470 ALTER TABLE ONLY signataire_arrete
3471 ADD CONSTRAINT signataire_arrete_pkey PRIMARY KEY (signataire_arrete);
3472
3473
3474 --
3475 -- Name: terrain_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3476 --
3477
3478 ALTER TABLE ONLY terrain
3479 ADD CONSTRAINT terrain_pkey PRIMARY KEY (terrain);
3480
3481
3482 --
3483 -- Name: transition_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3484 --
3485
3486 ALTER TABLE ONLY transition
3487 ADD CONSTRAINT transition_pkey PRIMARY KEY (transition);
3488
3489
3490 --
3491 -- Name: travaux_pkey; Type: CONSTRAINT; Schema: openads; Owner: -; Tablespace:
3492 --
3493
3494 ALTER TABLE ONLY travaux
3495 ADD CONSTRAINT travaux_pkey PRIMARY KEY (travaux);
3496
3497
3498 --
3499 -- Name: lien_demande_type_etat_dossier_autorisation_uk; Type: INDEX; Schema: openads; Owner: -; Tablespace:
3500 --
3501
3502 CREATE UNIQUE INDEX lien_demande_type_etat_dossier_autorisation_uk ON lien_demande_type_etat_dossier_autorisation USING btree (demande_type, etat_dossier_autorisation);
3503
3504
3505 --
3506 -- Name: affectation_automatique_arrondissement_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3507 --
3508
3509 ALTER TABLE ONLY affectation_automatique
3510 ADD CONSTRAINT affectation_automatique_arrondissement_fkey FOREIGN KEY (arrondissement) REFERENCES arrondissement(arrondissement);
3511
3512
3513 --
3514 -- Name: affectation_automatique_dossier_autorisation_type_detaille_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3515 --
3516
3517 ALTER TABLE ONLY affectation_automatique
3518 ADD CONSTRAINT affectation_automatique_dossier_autorisation_type_detaille_fkey FOREIGN KEY (dossier_autorisation_type_detaille) REFERENCES dossier_autorisation_type_detaille(dossier_autorisation_type_detaille);
3519
3520
3521 --
3522 -- Name: affectation_automatique_instructeur_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3523 --
3524
3525 ALTER TABLE ONLY affectation_automatique
3526 ADD CONSTRAINT affectation_automatique_instructeur_fkey FOREIGN KEY (instructeur) REFERENCES instructeur(instructeur);
3527
3528
3529 --
3530 -- Name: affectation_automatique_quartier_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3531 --
3532
3533 ALTER TABLE ONLY affectation_automatique
3534 ADD CONSTRAINT affectation_automatique_quartier_fkey FOREIGN KEY (quartier) REFERENCES quartier(quartier);
3535
3536
3537 --
3538 -- Name: bible_dossier_autorisation_type_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3539 --
3540
3541 ALTER TABLE ONLY bible
3542 ADD CONSTRAINT bible_dossier_autorisation_type_fkey FOREIGN KEY (dossier_autorisation_type) REFERENCES dossier_autorisation_type(dossier_autorisation_type);
3543
3544
3545 --
3546 -- Name: bible_evenement_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3547 --
3548
3549 ALTER TABLE ONLY bible
3550 ADD CONSTRAINT bible_evenement_fkey FOREIGN KEY (evenement) REFERENCES evenement(evenement);
3551
3552
3553 --
3554 -- Name: blocnote_dossier_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3555 --
3556
3557 ALTER TABLE ONLY blocnote
3558 ADD CONSTRAINT blocnote_dossier_fkey FOREIGN KEY (dossier) REFERENCES dossier(dossier);
3559
3560
3561 --
3562 -- Name: commission_commission_type_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3563 --
3564
3565 ALTER TABLE ONLY commission
3566 ADD CONSTRAINT commission_commission_type_fkey FOREIGN KEY (commission_type) REFERENCES commission_type(commission_type);
3567
3568
3569 --
3570 -- Name: consultation_avis_consultation_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3571 --
3572
3573 ALTER TABLE ONLY consultation
3574 ADD CONSTRAINT consultation_avis_consultation_fkey FOREIGN KEY (avis_consultation) REFERENCES avis_consultation(avis_consultation);
3575
3576
3577 --
3578 -- Name: consultation_dossier_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3579 --
3580
3581 ALTER TABLE ONLY consultation
3582 ADD CONSTRAINT consultation_dossier_fkey FOREIGN KEY (dossier) REFERENCES dossier(dossier);
3583
3584
3585 --
3586 -- Name: consultation_service_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3587 --
3588
3589 ALTER TABLE ONLY consultation
3590 ADD CONSTRAINT consultation_service_fkey FOREIGN KEY (service) REFERENCES service(service);
3591
3592
3593 --
3594 -- Name: demande_arrondissement_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3595 --
3596
3597 ALTER TABLE ONLY demande
3598 ADD CONSTRAINT demande_arrondissement_fkey FOREIGN KEY (arrondissement) REFERENCES arrondissement(arrondissement);
3599
3600
3601 --
3602 -- Name: demande_demande_type_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3603 --
3604
3605 ALTER TABLE ONLY demande
3606 ADD CONSTRAINT demande_demande_type_fkey FOREIGN KEY (demande_type) REFERENCES demande_type(demande_type);
3607
3608
3609 --
3610 -- Name: demande_dossier_autorisation_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3611 --
3612
3613 ALTER TABLE ONLY demande
3614 ADD CONSTRAINT demande_dossier_autorisation_fkey FOREIGN KEY (dossier_autorisation) REFERENCES dossier_autorisation(dossier_autorisation);
3615
3616
3617 --
3618 -- Name: demande_dossier_autorisation_type_detaille_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3619 --
3620
3621 ALTER TABLE ONLY demande
3622 ADD CONSTRAINT demande_dossier_autorisation_type_detaille_fkey FOREIGN KEY (dossier_autorisation_type_detaille) REFERENCES dossier_autorisation_type_detaille(dossier_autorisation_type_detaille);
3623
3624
3625 --
3626 -- Name: demande_dossier_instruction_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3627 --
3628
3629 ALTER TABLE ONLY demande
3630 ADD CONSTRAINT demande_dossier_instruction_fkey FOREIGN KEY (dossier_instruction) REFERENCES dossier(dossier);
3631
3632
3633 --
3634 -- Name: demande_instruction_recepisse_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3635 --
3636
3637 ALTER TABLE ONLY demande
3638 ADD CONSTRAINT demande_instruction_recepisse_fkey FOREIGN KEY (instruction_recepisse) REFERENCES instruction(instruction);
3639
3640
3641 --
3642 -- Name: demande_type_demande_nature_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3643 --
3644
3645 ALTER TABLE ONLY demande_type
3646 ADD CONSTRAINT demande_type_demande_nature_fkey FOREIGN KEY (demande_nature) REFERENCES demande_nature(demande_nature);
3647
3648
3649 --
3650 -- Name: demande_type_dossier_autorisation_type_detaille_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3651 --
3652
3653 ALTER TABLE ONLY demande_type
3654 ADD CONSTRAINT demande_type_dossier_autorisation_type_detaille_fkey FOREIGN KEY (dossier_autorisation_type_detaille) REFERENCES dossier_autorisation_type_detaille(dossier_autorisation_type_detaille);
3655
3656
3657 --
3658 -- Name: demande_type_dossier_instruction_type_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3659 --
3660
3661 ALTER TABLE ONLY demande_type
3662 ADD CONSTRAINT demande_type_dossier_instruction_type_fkey FOREIGN KEY (dossier_instruction_type) REFERENCES dossier_instruction_type(dossier_instruction_type);
3663
3664
3665 --
3666 -- Name: demande_type_evenement_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3667 --
3668
3669 ALTER TABLE ONLY demande_type
3670 ADD CONSTRAINT demande_type_evenement_fkey FOREIGN KEY (evenement) REFERENCES evenement(evenement);
3671
3672
3673 --
3674 -- Name: demande_type_groupe_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3675 --
3676
3677 ALTER TABLE ONLY demande_type
3678 ADD CONSTRAINT demande_type_groupe_fkey FOREIGN KEY (groupe) REFERENCES groupe(groupe);
3679
3680
3681 --
3682 -- Name: demandeur_particulier_civilite_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3683 --
3684
3685 ALTER TABLE ONLY demandeur
3686 ADD CONSTRAINT demandeur_particulier_civilite_fkey FOREIGN KEY (particulier_civilite) REFERENCES civilite(civilite);
3687
3688
3689 --
3690 -- Name: demandeur_personne_morale_civilite_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3691 --
3692
3693 ALTER TABLE ONLY demandeur
3694 ADD CONSTRAINT demandeur_personne_morale_civilite_fkey FOREIGN KEY (personne_morale_civilite) REFERENCES civilite(civilite);
3695
3696
3697 --
3698 -- Name: division_direction_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3699 --
3700
3701 ALTER TABLE ONLY division
3702 ADD CONSTRAINT division_direction_fkey FOREIGN KEY (direction) REFERENCES direction(direction);
3703
3704
3705 --
3706 -- Name: document_numerise_document_numerise_type_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3707 --
3708
3709 ALTER TABLE ONLY document_numerise
3710 ADD CONSTRAINT document_numerise_document_numerise_type_fkey FOREIGN KEY (document_numerise_type) REFERENCES document_numerise_type(document_numerise_type) MATCH FULL;
3711
3712
3713 --
3714 -- Name: document_numerise_dossier_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3715 --
3716
3717 ALTER TABLE ONLY document_numerise
3718 ADD CONSTRAINT document_numerise_dossier_fkey FOREIGN KEY (dossier) REFERENCES dossier(dossier) MATCH FULL ON UPDATE CASCADE ON DELETE SET NULL;
3719
3720
3721 --
3722 -- Name: document_numerise_type_document_numerise_type_categorie_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3723 --
3724
3725 ALTER TABLE ONLY document_numerise_type
3726 ADD CONSTRAINT document_numerise_type_document_numerise_type_categorie_fkey FOREIGN KEY (document_numerise_type_categorie) REFERENCES document_numerise_type_categorie(document_numerise_type_categorie) MATCH FULL;
3727
3728
3729 --
3730 -- Name: donnees_techniques_architecte_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3731 --
3732
3733 ALTER TABLE ONLY donnees_techniques
3734 ADD CONSTRAINT donnees_techniques_architecte_fkey FOREIGN KEY (architecte) REFERENCES architecte(architecte);
3735
3736
3737 --
3738 -- Name: donnees_techniques_dossier_instruction_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3739 --
3740
3741 ALTER TABLE ONLY donnees_techniques
3742 ADD CONSTRAINT donnees_techniques_dossier_instruction_fkey FOREIGN KEY (dossier_instruction) REFERENCES dossier(dossier);
3743
3744
3745 --
3746 -- Name: donnees_techniques_lot_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3747 --
3748
3749 ALTER TABLE ONLY donnees_techniques
3750 ADD CONSTRAINT donnees_techniques_lot_fkey FOREIGN KEY (lot) REFERENCES lot(lot);
3751
3752
3753 --
3754 -- Name: dossier_autorisation_arrondissement_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3755 --
3756
3757 ALTER TABLE ONLY dossier_autorisation
3758 ADD CONSTRAINT dossier_autorisation_arrondissement_fkey FOREIGN KEY (arrondissement) REFERENCES arrondissement(arrondissement);
3759
3760
3761 --
3762 -- Name: dossier_autorisation_avis_decision_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3763 --
3764
3765 ALTER TABLE ONLY dossier_autorisation
3766 ADD CONSTRAINT dossier_autorisation_avis_decision_fkey FOREIGN KEY (avis_decision) REFERENCES avis_decision(avis_decision);
3767
3768
3769 --
3770 -- Name: dossier_autorisation_donnees_techniques_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3771 --
3772
3773 ALTER TABLE ONLY donnees_techniques
3774 ADD CONSTRAINT dossier_autorisation_donnees_techniques_fkey FOREIGN KEY (dossier_autorisation) REFERENCES dossier_autorisation(dossier_autorisation);
3775
3776
3777 --
3778 -- Name: dossier_autorisation_etat_dernier_dossier_instruction_accepte_f; Type: FK CONSTRAINT; Schema: openads; Owner: -
3779 --
3780
3781 ALTER TABLE ONLY dossier_autorisation
3782 ADD CONSTRAINT dossier_autorisation_etat_dernier_dossier_instruction_accepte_f FOREIGN KEY (etat_dernier_dossier_instruction_accepte) REFERENCES etat_dossier_autorisation(etat_dossier_autorisation);
3783
3784
3785 --
3786 -- Name: dossier_autorisation_etat_dossier_autorisation_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3787 --
3788
3789 ALTER TABLE ONLY dossier_autorisation
3790 ADD CONSTRAINT dossier_autorisation_etat_dossier_autorisation_fkey FOREIGN KEY (etat_dossier_autorisation) REFERENCES etat_dossier_autorisation(etat_dossier_autorisation);
3791
3792
3793 --
3794 -- Name: dossier_autorisation_type_detaille_cerfa_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3795 --
3796
3797 ALTER TABLE ONLY dossier_autorisation_type_detaille
3798 ADD CONSTRAINT dossier_autorisation_type_detaille_cerfa_fkey FOREIGN KEY (cerfa) REFERENCES cerfa(cerfa);
3799
3800
3801 --
3802 -- Name: dossier_autorisation_type_detaille_cerfa_lot_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3803 --
3804
3805 ALTER TABLE ONLY dossier_autorisation_type_detaille
3806 ADD CONSTRAINT dossier_autorisation_type_detaille_cerfa_lot_fkey FOREIGN KEY (cerfa_lot) REFERENCES cerfa(cerfa);
3807
3808
3809 --
3810 -- Name: dossier_autorisation_type_detaille_dossier_autorisation_type_fk; Type: FK CONSTRAINT; Schema: openads; Owner: -
3811 --
3812
3813 ALTER TABLE ONLY dossier_autorisation_type_detaille
3814 ADD CONSTRAINT dossier_autorisation_type_detaille_dossier_autorisation_type_fk FOREIGN KEY (dossier_autorisation_type) REFERENCES dossier_autorisation_type(dossier_autorisation_type);
3815
3816
3817 --
3818 -- Name: dossier_autorisation_type_detaille_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3819 --
3820
3821 ALTER TABLE ONLY dossier_autorisation
3822 ADD CONSTRAINT dossier_autorisation_type_detaille_fkey FOREIGN KEY (dossier_autorisation_type_detaille) REFERENCES dossier_autorisation_type_detaille(dossier_autorisation_type_detaille);
3823
3824
3825 --
3826 -- Name: dossier_autorisation_type_groupe_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3827 --
3828
3829 ALTER TABLE ONLY dossier_autorisation_type
3830 ADD CONSTRAINT dossier_autorisation_type_groupe_fkey FOREIGN KEY (groupe) REFERENCES groupe(groupe);
3831
3832
3833 --
3834 -- Name: dossier_autorite_competente_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3835 --
3836
3837 ALTER TABLE ONLY dossier
3838 ADD CONSTRAINT dossier_autorite_competente_fkey FOREIGN KEY (autorite_competente) REFERENCES autorite_competente(autorite_competente);
3839
3840
3841 --
3842 -- Name: dossier_avis_decision_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3843 --
3844
3845 ALTER TABLE ONLY dossier
3846 ADD CONSTRAINT dossier_avis_decision_fkey FOREIGN KEY (avis_decision) REFERENCES avis_decision(avis_decision);
3847
3848
3849 --
3850 -- Name: dossier_commission_commission_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3851 --
3852
3853 ALTER TABLE ONLY dossier_commission
3854 ADD CONSTRAINT dossier_commission_commission_fkey FOREIGN KEY (commission) REFERENCES commission(commission);
3855
3856
3857 --
3858 -- Name: dossier_commission_commission_type_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3859 --
3860
3861 ALTER TABLE ONLY dossier_commission
3862 ADD CONSTRAINT dossier_commission_commission_type_fkey FOREIGN KEY (commission_type) REFERENCES commission_type(commission_type);
3863
3864
3865 --
3866 -- Name: dossier_commission_dossier_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3867 --
3868
3869 ALTER TABLE ONLY dossier_commission
3870 ADD CONSTRAINT dossier_commission_dossier_fkey FOREIGN KEY (dossier) REFERENCES dossier(dossier);
3871
3872
3873 --
3874 -- Name: dossier_division_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3875 --
3876
3877 ALTER TABLE ONLY dossier
3878 ADD CONSTRAINT dossier_division_fkey FOREIGN KEY (division) REFERENCES division(division);
3879
3880
3881 --
3882 -- Name: dossier_dossier_autorisation_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3883 --
3884
3885 ALTER TABLE ONLY dossier
3886 ADD CONSTRAINT dossier_dossier_autorisation_fkey FOREIGN KEY (dossier_autorisation) REFERENCES dossier_autorisation(dossier_autorisation);
3887
3888
3889 --
3890 -- Name: dossier_etat_archive_etat_pendant_incompletude_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3891 --
3892
3893 ALTER TABLE ONLY instruction
3894 ADD CONSTRAINT dossier_etat_archive_etat_pendant_incompletude_fkey FOREIGN KEY (archive_etat_pendant_incompletude) REFERENCES etat(etat);
3895
3896
3897 --
3898 -- Name: dossier_etat_etat_pendant_incompletude_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3899 --
3900
3901 ALTER TABLE ONLY dossier
3902 ADD CONSTRAINT dossier_etat_etat_pendant_incompletude_fkey FOREIGN KEY (etat_pendant_incompletude) REFERENCES etat(etat);
3903
3904
3905 --
3906 -- Name: dossier_etat_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3907 --
3908
3909 ALTER TABLE ONLY dossier
3910 ADD CONSTRAINT dossier_etat_fkey FOREIGN KEY (etat) REFERENCES etat(etat);
3911
3912
3913 --
3914 -- Name: dossier_evenement_archive_evenement_suivant_tacite_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3915 --
3916
3917 ALTER TABLE ONLY instruction
3918 ADD CONSTRAINT dossier_evenement_archive_evenement_suivant_tacite_fkey FOREIGN KEY (archive_evenement_suivant_tacite) REFERENCES evenement(evenement);
3919
3920
3921 --
3922 -- Name: dossier_evenement_archive_evenement_suivant_tacite_incompletude; Type: FK CONSTRAINT; Schema: openads; Owner: -
3923 --
3924
3925 ALTER TABLE ONLY instruction
3926 ADD CONSTRAINT dossier_evenement_archive_evenement_suivant_tacite_incompletude FOREIGN KEY (archive_evenement_suivant_tacite_incompletude) REFERENCES evenement(evenement);
3927
3928
3929 --
3930 -- Name: dossier_evenement_evenement_suivant_tacite_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3931 --
3932
3933 ALTER TABLE ONLY dossier
3934 ADD CONSTRAINT dossier_evenement_evenement_suivant_tacite_fkey FOREIGN KEY (evenement_suivant_tacite) REFERENCES evenement(evenement);
3935
3936
3937 --
3938 -- Name: dossier_evenement_evenement_suivant_tacite_incompletude_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3939 --
3940
3941 ALTER TABLE ONLY dossier
3942 ADD CONSTRAINT dossier_evenement_evenement_suivant_tacite_incompletude_fkey FOREIGN KEY (evenement_suivant_tacite_incompletude) REFERENCES evenement(evenement);
3943
3944
3945 --
3946 -- Name: dossier_instructeur_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3947 --
3948
3949 ALTER TABLE ONLY dossier
3950 ADD CONSTRAINT dossier_instructeur_fkey FOREIGN KEY (instructeur) REFERENCES instructeur(instructeur);
3951
3952
3953 --
3954 -- Name: dossier_instruction_type_dossier_autorisation_type_detaille_fke; Type: FK CONSTRAINT; Schema: openads; Owner: -
3955 --
3956
3957 ALTER TABLE ONLY dossier_instruction_type
3958 ADD CONSTRAINT dossier_instruction_type_dossier_autorisation_type_detaille_fke FOREIGN KEY (dossier_autorisation_type_detaille) REFERENCES dossier_autorisation_type_detaille(dossier_autorisation_type_detaille);
3959
3960
3961 --
3962 -- Name: dossier_instruction_type_dossier_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3963 --
3964
3965 ALTER TABLE ONLY dossier
3966 ADD CONSTRAINT dossier_instruction_type_dossier_fkey FOREIGN KEY (dossier_instruction_type) REFERENCES dossier_instruction_type(dossier_instruction_type);
3967
3968
3969 --
3970 -- Name: dossier_message_dossier_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3971 --
3972
3973 ALTER TABLE ONLY dossier_message
3974 ADD CONSTRAINT dossier_message_dossier_fkey FOREIGN KEY (dossier) REFERENCES dossier(dossier);
3975
3976
3977 --
3978 -- Name: dossier_parcelle_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3979 --
3980
3981 ALTER TABLE ONLY dossier
3982 ADD CONSTRAINT dossier_parcelle_fkey FOREIGN KEY (parcelle) REFERENCES parcelle(parcelle);
3983
3984
3985 --
3986 -- Name: dossier_parcelle_lot_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3987 --
3988
3989 ALTER TABLE ONLY dossier
3990 ADD CONSTRAINT dossier_parcelle_lot_fkey FOREIGN KEY (parcelle_lot) REFERENCES parcelle_lot(parcelle_lot);
3991
3992
3993 --
3994 -- Name: dossier_pos_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
3995 --
3996
3997 ALTER TABLE ONLY dossier
3998 ADD CONSTRAINT dossier_pos_fkey FOREIGN KEY (pos) REFERENCES pos(pos);
3999
4000
4001 --
4002 -- Name: evenement_action_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4003 --
4004
4005 ALTER TABLE ONLY evenement
4006 ADD CONSTRAINT evenement_action_fkey FOREIGN KEY (action) REFERENCES action(action);
4007
4008
4009 --
4010 -- Name: evenement_autorite_competente_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4011 --
4012
4013 ALTER TABLE ONLY evenement
4014 ADD CONSTRAINT evenement_autorite_competente_fkey FOREIGN KEY (autorite_competente) REFERENCES autorite_competente(autorite_competente);
4015
4016
4017 --
4018 -- Name: evenement_avis_decision_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4019 --
4020
4021 ALTER TABLE ONLY evenement
4022 ADD CONSTRAINT evenement_avis_decision_fkey FOREIGN KEY (avis_decision) REFERENCES avis_decision(avis_decision);
4023
4024
4025 --
4026 -- Name: evenement_etat_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4027 --
4028
4029 ALTER TABLE ONLY evenement
4030 ADD CONSTRAINT evenement_etat_fkey FOREIGN KEY (etat) REFERENCES etat(etat);
4031
4032
4033 --
4034 -- Name: evenement_evenement_retour_ar_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4035 --
4036
4037 ALTER TABLE ONLY evenement
4038 ADD CONSTRAINT evenement_evenement_retour_ar_fkey FOREIGN KEY (evenement_retour_ar) REFERENCES evenement(evenement);
4039
4040
4041 --
4042 -- Name: evenement_evenement_retour_signature_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4043 --
4044
4045 ALTER TABLE ONLY evenement
4046 ADD CONSTRAINT evenement_evenement_retour_signature_fkey FOREIGN KEY (evenement_retour_signature) REFERENCES evenement(evenement);
4047
4048
4049 --
4050 -- Name: evenement_evenement_suivant_tacite_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4051 --
4052
4053 ALTER TABLE ONLY evenement
4054 ADD CONSTRAINT evenement_evenement_suivant_tacite_fkey FOREIGN KEY (evenement_suivant_tacite) REFERENCES evenement(evenement);
4055
4056
4057 --
4058 -- Name: groupe_genre_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4059 --
4060
4061 ALTER TABLE ONLY groupe
4062 ADD CONSTRAINT groupe_genre_fkey FOREIGN KEY (genre) REFERENCES genre(genre);
4063
4064
4065 --
4066 -- Name: instructeur_division_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4067 --
4068
4069 ALTER TABLE ONLY instructeur
4070 ADD CONSTRAINT instructeur_division_fkey FOREIGN KEY (division) REFERENCES division(division);
4071
4072
4073 --
4074 -- Name: instructeur_om_utilisateur_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4075 --
4076
4077 ALTER TABLE ONLY instructeur
4078 ADD CONSTRAINT instructeur_om_utilisateur_fkey FOREIGN KEY (om_utilisateur) REFERENCES om_utilisateur(om_utilisateur);
4079
4080
4081 --
4082 -- Name: instruction_action_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4083 --
4084
4085 ALTER TABLE ONLY instruction
4086 ADD CONSTRAINT instruction_action_fkey FOREIGN KEY (action) REFERENCES action(action);
4087
4088
4089 --
4090 -- Name: instruction_autorite_competente_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4091 --
4092
4093 ALTER TABLE ONLY instruction
4094 ADD CONSTRAINT instruction_autorite_competente_fkey FOREIGN KEY (autorite_competente) REFERENCES autorite_competente(autorite_competente);
4095
4096
4097 --
4098 -- Name: instruction_avis_decision_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4099 --
4100
4101 ALTER TABLE ONLY instruction
4102 ADD CONSTRAINT instruction_avis_decision_fkey FOREIGN KEY (avis_decision) REFERENCES avis_decision(avis_decision);
4103
4104
4105 --
4106 -- Name: instruction_document_numerise_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4107 --
4108
4109 ALTER TABLE ONLY instruction
4110 ADD CONSTRAINT instruction_document_numerise_fkey FOREIGN KEY (document_numerise) REFERENCES document_numerise(document_numerise);
4111
4112
4113 --
4114 -- Name: instruction_dossier_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4115 --
4116
4117 ALTER TABLE ONLY instruction
4118 ADD CONSTRAINT instruction_dossier_fkey FOREIGN KEY (dossier) REFERENCES dossier(dossier);
4119
4120
4121 --
4122 -- Name: instruction_etat_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4123 --
4124
4125 ALTER TABLE ONLY instruction
4126 ADD CONSTRAINT instruction_etat_fkey FOREIGN KEY (etat) REFERENCES etat(etat);
4127
4128
4129 --
4130 -- Name: instruction_evenement_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4131 --
4132
4133 ALTER TABLE ONLY instruction
4134 ADD CONSTRAINT instruction_evenement_fkey FOREIGN KEY (evenement) REFERENCES evenement(evenement);
4135
4136
4137 --
4138 -- Name: instruction_signataire_arrete_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4139 --
4140
4141 ALTER TABLE ONLY instruction
4142 ADD CONSTRAINT instruction_signataire_arrete_fkey FOREIGN KEY (signataire_arrete) REFERENCES signataire_arrete(signataire_arrete);
4143
4144
4145 --
4146 -- Name: lien_demande_demandeur_demande_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4147 --
4148
4149 ALTER TABLE ONLY lien_demande_demandeur
4150 ADD CONSTRAINT lien_demande_demandeur_demande_fkey FOREIGN KEY (demande) REFERENCES demande(demande);
4151
4152
4153 --
4154 -- Name: lien_demande_demandeur_demandeur_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4155 --
4156
4157 ALTER TABLE ONLY lien_demande_demandeur
4158 ADD CONSTRAINT lien_demande_demandeur_demandeur_fkey FOREIGN KEY (demandeur) REFERENCES demandeur(demandeur);
4159
4160
4161 --
4162 -- Name: lien_demande_type_etat_dossier_autorisation_demande_type_fk; Type: FK CONSTRAINT; Schema: openads; Owner: -
4163 --
4164
4165 ALTER TABLE ONLY lien_demande_type_etat_dossier_autorisation
4166 ADD CONSTRAINT lien_demande_type_etat_dossier_autorisation_demande_type_fk FOREIGN KEY (demande_type) REFERENCES demande_type(demande_type);
4167
4168
4169 --
4170 -- Name: lien_demande_type_etat_dossier_autorisation_etat_dossier_autori; Type: FK CONSTRAINT; Schema: openads; Owner: -
4171 --
4172
4173 ALTER TABLE ONLY lien_demande_type_etat_dossier_autorisation
4174 ADD CONSTRAINT lien_demande_type_etat_dossier_autorisation_etat_dossier_autori FOREIGN KEY (etat_dossier_autorisation) REFERENCES etat_dossier_autorisation(etat_dossier_autorisation);
4175
4176
4177 --
4178 -- Name: lien_dossier_autorisation_demandeur_demande_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4179 --
4180
4181 ALTER TABLE ONLY lien_dossier_autorisation_demandeur
4182 ADD CONSTRAINT lien_dossier_autorisation_demandeur_demande_fkey FOREIGN KEY (dossier_autorisation) REFERENCES dossier_autorisation(dossier_autorisation);
4183
4184
4185 --
4186 -- Name: lien_dossier_autorisation_demandeur_demandeur_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4187 --
4188
4189 ALTER TABLE ONLY lien_dossier_autorisation_demandeur
4190 ADD CONSTRAINT lien_dossier_autorisation_demandeur_demandeur_fkey FOREIGN KEY (demandeur) REFERENCES demandeur(demandeur);
4191
4192
4193 --
4194 -- Name: lien_dossier_demandeur_demandeur_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4195 --
4196
4197 ALTER TABLE ONLY lien_dossier_demandeur
4198 ADD CONSTRAINT lien_dossier_demandeur_demandeur_fkey FOREIGN KEY (demandeur) REFERENCES demandeur(demandeur);
4199
4200
4201 --
4202 -- Name: lien_dossier_demandeur_dossier_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4203 --
4204
4205 ALTER TABLE ONLY lien_dossier_demandeur
4206 ADD CONSTRAINT lien_dossier_demandeur_dossier_fkey FOREIGN KEY (dossier) REFERENCES dossier(dossier);
4207
4208
4209 --
4210 -- Name: lien_dossier_instruction_type_evenement_dossier_instruction_typ; Type: FK CONSTRAINT; Schema: openads; Owner: -
4211 --
4212
4213 ALTER TABLE ONLY lien_dossier_instruction_type_evenement
4214 ADD CONSTRAINT lien_dossier_instruction_type_evenement_dossier_instruction_typ FOREIGN KEY (dossier_instruction_type) REFERENCES dossier_instruction_type(dossier_instruction_type);
4215
4216
4217 --
4218 -- Name: lien_dossier_instruction_type_evenement_evenement_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4219 --
4220
4221 ALTER TABLE ONLY lien_dossier_instruction_type_evenement
4222 ADD CONSTRAINT lien_dossier_instruction_type_evenement_evenement_fkey FOREIGN KEY (evenement) REFERENCES evenement(evenement);
4223
4224
4225 --
4226 -- Name: lien_evenement_dossier_autorisation_type_dossier_autorisation_t; Type: FK CONSTRAINT; Schema: openads; Owner: -
4227 --
4228
4229 ALTER TABLE ONLY lien_evenement_dossier_autorisation_type
4230 ADD CONSTRAINT lien_evenement_dossier_autorisation_type_dossier_autorisation_t FOREIGN KEY (dossier_autorisation_type) REFERENCES dossier_autorisation_type(dossier_autorisation_type);
4231
4232
4233 --
4234 -- Name: lien_evenement_dossier_autorisation_type_evenement_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4235 --
4236
4237 ALTER TABLE ONLY lien_evenement_dossier_autorisation_type
4238 ADD CONSTRAINT lien_evenement_dossier_autorisation_type_evenement_fkey FOREIGN KEY (evenement) REFERENCES evenement(evenement);
4239
4240
4241 --
4242 -- Name: lien_lot_demandeur_demandeur_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4243 --
4244
4245 ALTER TABLE ONLY lien_lot_demandeur
4246 ADD CONSTRAINT lien_lot_demandeur_demandeur_fkey FOREIGN KEY (demandeur) REFERENCES demandeur(demandeur);
4247
4248
4249 --
4250 -- Name: lien_lot_demandeur_lot_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4251 --
4252
4253 ALTER TABLE ONLY lien_lot_demandeur
4254 ADD CONSTRAINT lien_lot_demandeur_lot_fkey FOREIGN KEY (lot) REFERENCES lot(lot);
4255
4256
4257 --
4258 -- Name: lien_service_om_utilisateur_om_utilisateur_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4259 --
4260
4261 ALTER TABLE ONLY lien_service_om_utilisateur
4262 ADD CONSTRAINT lien_service_om_utilisateur_om_utilisateur_fkey FOREIGN KEY (om_utilisateur) REFERENCES om_utilisateur(om_utilisateur);
4263
4264
4265 --
4266 -- Name: lien_service_om_utilisateur_service_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4267 --
4268
4269 ALTER TABLE ONLY lien_service_om_utilisateur
4270 ADD CONSTRAINT lien_service_om_utilisateur_service_fkey FOREIGN KEY (service) REFERENCES service(service);
4271
4272
4273 --
4274 -- Name: lien_service_service_categorie_service_categorie_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4275 --
4276
4277 ALTER TABLE ONLY lien_service_service_categorie
4278 ADD CONSTRAINT lien_service_service_categorie_service_categorie_fkey FOREIGN KEY (service_categorie) REFERENCES service_categorie(service_categorie);
4279
4280
4281 --
4282 -- Name: lien_service_service_categorie_service_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4283 --
4284
4285 ALTER TABLE ONLY lien_service_service_categorie
4286 ADD CONSTRAINT lien_service_service_categorie_service_fkey FOREIGN KEY (service) REFERENCES service(service);
4287
4288
4289 --
4290 -- Name: lot_dossier_autorisation_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4291 --
4292
4293 ALTER TABLE ONLY lot
4294 ADD CONSTRAINT lot_dossier_autorisation_fkey FOREIGN KEY (dossier_autorisation) REFERENCES dossier_autorisation(dossier_autorisation);
4295
4296
4297 --
4298 -- Name: lot_dossier_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4299 --
4300
4301 ALTER TABLE ONLY lot
4302 ADD CONSTRAINT lot_dossier_fkey FOREIGN KEY (dossier) REFERENCES dossier(dossier);
4303
4304
4305 --
4306 -- Name: parcelle_pos_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4307 --
4308
4309 ALTER TABLE ONLY parcelle
4310 ADD CONSTRAINT parcelle_pos_fkey FOREIGN KEY (pos) REFERENCES pos(pos);
4311
4312
4313 --
4314 -- Name: parcelle_proprietaire_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4315 --
4316
4317 ALTER TABLE ONLY parcelle
4318 ADD CONSTRAINT parcelle_proprietaire_fkey FOREIGN KEY (proprietaire) REFERENCES proprietaire(proprietaire);
4319
4320
4321 --
4322 -- Name: parcelle_rivoli_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4323 --
4324
4325 ALTER TABLE ONLY parcelle
4326 ADD CONSTRAINT parcelle_rivoli_fkey FOREIGN KEY (rivoli) REFERENCES rivoli(rivoli);
4327
4328
4329 --
4330 -- Name: proprietaire_civilite_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4331 --
4332
4333 ALTER TABLE ONLY proprietaire
4334 ADD CONSTRAINT proprietaire_civilite_fkey FOREIGN KEY (civilite) REFERENCES civilite(civilite);
4335
4336
4337 --
4338 -- Name: quartier_arrondissement_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4339 --
4340
4341 ALTER TABLE ONLY quartier
4342 ADD CONSTRAINT quartier_arrondissement_fkey FOREIGN KEY (arrondissement) REFERENCES arrondissement(arrondissement);
4343
4344
4345 --
4346 -- Name: rapport_instruction_dossier_instruction_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4347 --
4348
4349 ALTER TABLE ONLY rapport_instruction
4350 ADD CONSTRAINT rapport_instruction_dossier_instruction_fkey FOREIGN KEY (dossier_instruction) REFERENCES dossier(dossier);
4351
4352
4353 --
4354 -- Name: signataire_arrete_civilite_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4355 --
4356
4357 ALTER TABLE ONLY signataire_arrete
4358 ADD CONSTRAINT signataire_arrete_civilite_fkey FOREIGN KEY (civilite) REFERENCES civilite(civilite);
4359
4360
4361 --
4362 -- Name: terrain_dossier_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4363 --
4364
4365 ALTER TABLE ONLY terrain
4366 ADD CONSTRAINT terrain_dossier_fkey FOREIGN KEY (dossier) REFERENCES dossier(dossier);
4367
4368
4369 --
4370 -- Name: terrain_parcelle_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4371 --
4372
4373 ALTER TABLE ONLY terrain
4374 ADD CONSTRAINT terrain_parcelle_fkey FOREIGN KEY (parcelle) REFERENCES parcelle(parcelle);
4375
4376
4377 --
4378 -- Name: transition_etat_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4379 --
4380
4381 ALTER TABLE ONLY transition
4382 ADD CONSTRAINT transition_etat_fkey FOREIGN KEY (etat) REFERENCES etat(etat);
4383
4384
4385 --
4386 -- Name: transition_evenement_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4387 --
4388
4389 ALTER TABLE ONLY transition
4390 ADD CONSTRAINT transition_evenement_fkey FOREIGN KEY (evenement) REFERENCES evenement(evenement);
4391
4392
4393 --
4394 -- Name: travaux_dossier_autorisation_type_fkey; Type: FK CONSTRAINT; Schema: openads; Owner: -
4395 --
4396
4397 ALTER TABLE ONLY travaux
4398 ADD CONSTRAINT travaux_dossier_autorisation_type_fkey FOREIGN KEY (dossier_autorisation_type) REFERENCES dossier_autorisation_type(dossier_autorisation_type);
4399
4400
4401 --
4402 -- PostgreSQL database dump complete
4403 --
4404

Properties

Name Value
svn:keywords Id

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26