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
| CREATE TABLE "CONTRAT_TRAVAIL" (
"CODE_CONTRAT" CHAR(4) NOT NULL,
"LIBELLE_CONTRAT" CHAR(50) NOT NULL,
"DUREE_HEBDOMADAIRE" DECIMAL(4,2) NOT NULL,
"CODE_CP" CHAR(3) NOT NULL,
"NB_JOURS_CP" SMALLINT NOT NULL,
"ANCIENNETE_POSSIBLE" CHAR(1) DEFAULT 'O',
"CODE_CONGES_ANCIENNETE" CHAR(3),
"NB_JOURS_ANCIENNETE" SMALLINT,
"DELAI_ANCIENNETE" SMALLINT,
"AUTRES_CONGES_1" CHAR(1) NOT NULL,
"CODE_CONGES_1" CHAR(3),
"NB_JOURS_CONGES_1" SMALLINT DEFAULT 0 NOT NULL,
"AUTRES_CONGES_2" CHAR(1),
"CODE_CONGES_2" CHAR(3),
"NB_JOURS_CONGES_2" SMALLINT DEFAULT 0 NOT NULL,
"RTT_POSSIBLE" CHAR(1) DEFAULT 'O' NOT NULL,
"CODE_RTT" CHAR(3),
"NB_JOURS_RTT" SMALLINT DEFAULT 0 NOT NULL,
PRIMARY KEY ("CODE_CONTRAT")
);
ALTER TABLE "CONTRAT_TRAVAIL" ADD FOREIGN KEY ("CODE_CP") REFERENCES "CODE_ABSENCE" ("ABS_CD") ON UPDATE NO ACTION ON DELETE NO ACTION;
ALTER TABLE "CONTRAT_TRAVAIL" ADD FOREIGN KEY ("CODE_CONGES_ANCIENNETE") REFERENCES "CODE_ABSENCE" ("ABS_CD") ON UPDATE NO ACTION ON DELETE NO ACTION;
ALTER TABLE "CONTRAT_TRAVAIL" ADD FOREIGN KEY ("CODE_CONGES_1") REFERENCES "CODE_ABSENCE" ("ABS_CD") ON UPDATE NO ACTION ON DELETE NO ACTION;
ALTER TABLE "CONTRAT_TRAVAIL" ADD FOREIGN KEY ("CODE_RTT") REFERENCES "CODE_ABSENCE" ("ABS_CD") ON UPDATE NO ACTION ON DELETE NO ACTION;
ALTER TABLE "CONTRAT_TRAVAIL" ADD FOREIGN KEY ("CODE_CONGES_2") REFERENCES "CODE_ABSENCE" ("ABS_CD") ON UPDATE NO ACTION ON DELETE NO ACTION; |
Partager