USE `spidd`;

DROP TABLE IF EXISTS CATEGORIE_EPREUVE;


CREATE TABLE `CATEGORIE_EPREUVE` (
  `DIV_ID` bigint(20) NOT NULL,
  `CAT_ID` bigint(20) NOT NULL,
  `CAT_EPR_BL_PRINCIPAL` bit(1) DEFAULT NULL,
  PRIMARY KEY (`DIV_ID`,`CAT_ID`),
  KEY `FK_CATEGORIE_EPREUVE_CAT` (`CAT_ID`),
  CONSTRAINT `FK_CATEGORIE_EPREUVE_CAT` FOREIGN KEY (`CAT_ID`) REFERENCES `cat_sport` (`CAT_SPORT_ID`),
  CONSTRAINT `FK_CATEGORIE_EPREUVE_DIVISION` FOREIGN KEY (`DIV_ID`) REFERENCES `division` (`DIV_ID`)
);

