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
| CREATE TABLE `structure` (
`str_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`str_raison_soc` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`str_adresse1` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`str_adresse2` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`str_cp` int(5) unsigned zerofill NOT NULL,
`str_ville` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`str_groupe` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`str_id`)
);
CREATE TABLE `contact` (
`con_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`con_nom` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`con_prenom` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`con_email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`con_mdp` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
`con_ville` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`con_cp` int(5) unsigned zerofill NOT NULL,
`con_actif` tinyint(3) unsigned DEFAULT NULL,
PRIMARY KEY (`con_id`)
);
CREATE TABLE `selection` (
`sel_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`cat_id` int(10) unsigned NOT NULL,
`sel_nom` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`sel_id`),
);
CREATE TABLE `vote` (
`vot_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`sel_id` int(10) unsigned DEFAULT NULL,
`str_id` int(10) unsigned DEFAULT NULL,
`vot_nb_voix` int(10) unsigned NOT NULL,
`vot_date` datetime NOT NULL,
`vot_ip` int(10) unsigned NOT NULL,
PRIMARY KEY (`vot_id`)
);
CREATE TABLE `vote_contact` (
`vop_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`sel_id` int(10) unsigned DEFAULT NULL,
`con_id` int(10) unsigned DEFAULT NULL,
`vop_date` datetime NOT NULL,
`vop_ip` int(10) unsigned NOT NULL,
PRIMARY KEY (`vop_id`)
); |
Partager