Commit 44ace62f authored by Loïc DAYOT's avatar Loïc DAYOT Committed by Ploc
Browse files

fix(sql): sql schema for install

Add autoincrement in localgroups table.
Adjust , in create query.
parent 21c9997b
......@@ -78,7 +78,7 @@ DEALLOCATE PREPARE stmt;
SET @s = CONCAT("CREATE TABLE IF NOT EXISTS ", @tablePrefix, "localgroups",
" (
`id` int(11) NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`country` varchar(255) DEFAULT NULL,
`name` varchar(255) NOT NULL DEFAULT '',
`url` varchar(255) NOT NULL DEFAULT '',
......@@ -97,10 +97,8 @@ SET @s = CONCAT("CREATE TABLE IF NOT EXISTS ", @tablePrefix, "localgroups",
`decision_time` datetime NOT NULL,
`submission_time` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `name` (`name`)
KEY `department` (`department`),
KEY `region` (`region`),
KEY `moderated` (`moderated`),
KEY `name` (`name`),
KEY `moderated` (`moderated`)
) DEFAULT CHARSET=utf8;");
PREPARE stmt FROM @s;
EXECUTE stmt;
......@@ -150,7 +148,7 @@ SET @s = CONCAT("CREATE TABLE IF NOT EXISTS ", @tablePrefix, "notes",
`event_id` int(11) default NULL,
`author_id` int(11) default NULL,
PRIMARY KEY (`id`)
);");
) DEFAULT CHARSET=utf8;");
PREPARE stmt FROM @s;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
......@@ -264,4 +262,3 @@ EXECUTE stmt;
DEALLOCATE PREPARE stmt;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment