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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1844 - (hide annotations)
Mon May 6 14:04:34 2013 UTC (11 years, 9 months ago) by fmichon
File size: 113168 byte(s)
Mise à jour des fichiers init*.sql pour la release de la version 3.4.0-a1

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

Properties

Name Value
svn:keywords Id

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26