pictodb-schema revision

parent d9e870b8
Showing with 3 additions and 0 deletions
......@@ -269,6 +269,7 @@ CREATE TABLE `grid` (
`active` tinyint(1) NOT NULL DEFAULT '0',
`id_sup` int(11) DEFAULT NULL,
`id_stu` int(11) NOT NULL,
`color` varchar(7) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `id_sup` (`id_sup`),
KEY `id_stu` (`id_stu`),
......@@ -328,8 +329,10 @@ CREATE TABLE `stu_picto` (
KEY `fk_picto` (`id_pic`),
KEY `id_stu` (`id_stu`),
KEY `stu_picto_grid_fk` (`id_grid`),
KEY `id_child_grid` (`id_child_grid`),
CONSTRAINT `fk_picto` FOREIGN KEY (`id_pic`) REFERENCES `picto` (`id`),
CONSTRAINT `stu_picto_ibfk_1` FOREIGN KEY (`id_stu`) REFERENCES `student` (`id`),
CONSTRAINT `stu_picto_ibfk_2` FOREIGN KEY (`id_child_grid`) REFERENCES `grid` (`id`) ON DELETE SET NULL,
CONSTRAINT `stu_picto_grid_fk` FOREIGN KEY (`id_grid`) REFERENCES `grid` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7010 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='This table relates a student with the pictos in her vocabulary';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment