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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
--
-- Structure de la table `t_gpco`
--
CREATE TABLE `t_gpco` (
`id_gpco` tinyint(4) NOT NULL auto_increment,
`lib_gpco` varchar(20) character set latin1 collate latin1_general_cs NOT NULL,
`id_domaine` int(4) NOT NULL,
PRIMARY KEY (`id_gpco`),
KEY `t_gpco_ibfk_1` (`id_domaine`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=31 ;
--
-- Structure de la table `t_groupe`
--
CREATE TABLE `t_groupe` (
`id_groupe` tinyint(4) NOT NULL auto_increment,
`lib_groupe` varchar(20) character set latin1 collate latin1_general_cs NOT NULL,
`id_domaine` int(4) NOT NULL,
PRIMARY KEY (`id_groupe`),
KEY `t_groupe_ibfk_1` (`id_domaine`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ;
--
-- Structure de la table `t_domaine`
--
CREATE TABLE `t_domaine` (
`id_domaine` int(4) NOT NULL auto_increment,
`lib_domaine` varchar(20) character set latin1 collate latin1_general_cs NOT NULL,
`tab_name` varchar(20) NOT NULL,
`espace_depot` varchar(250) NOT NULL,
PRIMARY KEY (`id_domaine`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
--
-- Contraintes pour la table `t_correspondance`
--
ALTER TABLE `t_correspondance`
ADD CONSTRAINT `t_correspondance_ibfk_18` FOREIGN KEY (`id_groupe`) REFERENCES `t_groupe` (`id_groupe`) ON DELETE CASCADE,
ADD CONSTRAINT `t_corresp_ibfk_19` FOREIGN KEY (`id_intervenant`) REFERENCES `t_intervenant` (`id_intervenant`) ON DELETE CASCADE;
--
-- Contraintes pour la table `t_gpco`
--
ALTER TABLE `t_gpco`
ADD CONSTRAINT `t_gpco_ibfk_1` FOREIGN KEY (`id_domaine`) REFERENCES `t_domaine` (`id_domaine`) ON DELETE CASCADE;
--
-- Contraintes pour la table `t_groupe`
--
ALTER TABLE `t_groupe`
ADD CONSTRAINT `t_groupe_ibfk_1` FOREIGN KEY (`id_domaine`) REFERENCES `t_domaine` (`id_domaine`) ON DELETE CASCADE; |
Partager