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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
| /*********************************/
CREATE TABLE `t_contenue` (
`id_contenue` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`contenue` text NOT NULL,
PRIMARY KEY (`id_contenue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `t_revision` (
`id_rev` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`email` varchar(100) NOT NULL,
`num_rev` int(10) UNSIGNED NOT NULL,
`id_contenue` int(10) UNSIGNED NOT NULL,
`date` datetime NOT NULL,
PRIMARY KEY (`id_rev`,`num_rev`),
FOREIGN KEY (`id_contenue`) REFERENCES `t_contenue` (`id_contenue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `t_edition`(
`id_edition` int(10) unsigned NOT NULL auto_increment,
`nom_edition` text NOT NULL,
PRIMARY KEY (`id_edition`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `t_groupe` (
`id_groupe` int(10) unsigned NOT NULL auto_increment,
`nom_groupe` text NOT NULL,
PRIMARY KEY (`id_groupe`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `t_visibilite` (
`id_visibilite` int(10) unsigned NOT NULL auto_increment,
`nom_visibilite` text NOT NULL,
PRIMARY KEY (`id_visibilite`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
CREATE TABLE `t_users` (
`nom` varchar(50) NOT NULL,
`prenom` varchar(50) NOT NULL,
`login` varchar(50) NOT NULL,
`date` datetime NOT NULL,
`adresse` varchar(200) NOT NULL,
`mdp` varchar(50) NOT NULL,
`email` varchar(100) NOT NULL,
`idgroup` int(10) unsigned NOT NULL,
`idstyle` varchar(12) NOT NULL,
PRIMARY KEY (`email`),
FOREIGN KEY (`idgroup`) REFERENCES `t_groupe` (`id_groupe`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `t_menu` (
`id_menu` int(10) NOT NULL auto_increment,
`id_position` int(11) NOT NULL,
`titre` text NOT NULL,
`visible` tinyint(1) NOT NULL,
`id_contenue` int(10) UNSIGNED NOT NULL,
`num_rev` int(10) UNSIGNED NOT NULL,
PRIMARY KEY (`id_menu`),
UNIQUE KEY `id_position` (`id_position`),
FOREIGN KEY (`id_contenue`) REFERENCES `t_revision` (`id_contenue`),
FOREIGN KEY (`num_rev`) REFERENCES `t_revision` (`num_rev`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `t_lien` (
`id_lien` int(10) NOT NULL auto_increment,
`id_position` int(10) NOT NULL,
`titre` text NOT NULL,
`visible` tinyint(1) NOT NULL,
`edit` tinyint(1) NOT NULL,
`id_contenu` int(10) UNSIGNED NOT NULL,
`num_rev` int(10) UNSIGNED NOT NULL,
PRIMARY KEY (`id_menu`),
UNIQUE KEY `id_position` (`id_position`),
FOREIGN KEY (`id_contenue`) REFERENCES `t_revision` (`id_contenue`),
FOREIGN KEY (`num_rev`) REFERENCES `t_revision` (`num_rev`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
Partager