From ab24ac57bda3bf9357a1c63bc389ccdd053fc86a Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 21 Oct 2014 13:16:59 +0200 Subject: [PATCH] Forgot AUTO_INCREMENT on id columns --- docs/database/schema.mysql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/database/schema.mysql b/docs/database/schema.mysql index 75edb2e..469fd00 100644 --- a/docs/database/schema.mysql +++ b/docs/database/schema.mysql @@ -72,7 +72,7 @@ CREATE TABLE `email_invitations` ( ) ENGINE INNODB DEFAULT CHARSET=utf8; CREATE TABLE `api_keys` ( - `id` INT UNSIGNED NOT NULL, + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `token` VARCHAR(160) NOT NULL, `admin` TINYINT UNSIGNED DEFAULT '0', `not_after` DATETIME DEFAULT NULL, @@ -82,9 +82,10 @@ CREATE TABLE `api_keys` ( ) ENGINE INNODB DEFAULT CHARSET=utf8; CREATE TABLE `room_keys` ( - `id` INT UNSIGNED NOT NULL, + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `room_id` INT UNSIGNED NOT NULL, `key_id` INT UNSIGNED NOT NULL, + `role` ENUM('owner', 'participant') DEFAULT 'participant', PRIMARY KEY (`id`), UNIQUE (`room_id`, `key_id`), FOREIGN KEY (`room_id`) REFERENCES `rooms` (`id`)