1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| CREATE TABLE dwh.cpt_affectation (
affectation_id int4 NOT NULL,
adhesion_id int4 NULL,
numero_contrat_id varchar(20) NULL,
rang_contrat_id int4 NULL,
numero_maj_id int4 NULL,
cotisation_id int4 NULL,
version_cotisation_nu int4 NULL,
prime_id varchar(20) NULL,
redacteur_cd varchar(10) NOT NULL,
mouvement_id varchar(20) NOT NULL,
personne_id varchar(20) NULL,
role_cd bpchar(2) NULL,
affectation_dt date NULL,
montant_ht_nu numeric(20,5) NULL,
sens_cd bpchar(1) NULL,
contentieux_cd bpchar(1) NULL,
sid_frachr_in int4 NULL,
sid_publie_in int4 NULL,
sid_creation_ts timestamp NULL,
sid_maj_ts timestamp NULL,
sid_publie_ts timestamp NULL
)
WITH (
OIDS=FALSE
);
CREATE INDEX xfk_cpt_affectation ON dwh.cpt_affectation (mouvement_id);
CREATE INDEX xfk_cpt_affectation2 ON dwh.cpt_affectation (redacteur_cd);
CREATE INDEX xfk_cpt_affectation3 ON dwh.cpt_affectation (numero_contrat_id,rang_contrat_id,numero_maj_id,cotisation_id,version_cotisation_nu,prime_id);
CREATE INDEX xfk_cpt_affectation4 ON dwh.cpt_affectation (personne_id,role_cd);
CREATE INDEX xfk_cpt_affectation5 ON dwh.cpt_affectation (adhesion_id);
CREATE INDEX xpk_cpt_affectation ON dwh.cpt_affectation (affectation_id); |
Partager