Forgot AUTO_INCREMENT on id columns

master
Daniel Berteaud 10 years ago
parent a903c5d0ec
commit ab24ac57bd
  1. 5
      docs/database/schema.mysql

@ -72,7 +72,7 @@ CREATE TABLE `email_invitations` (
) ENGINE INNODB DEFAULT CHARSET=utf8; ) ENGINE INNODB DEFAULT CHARSET=utf8;
CREATE TABLE `api_keys` ( CREATE TABLE `api_keys` (
`id` INT UNSIGNED NOT NULL, `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`token` VARCHAR(160) NOT NULL, `token` VARCHAR(160) NOT NULL,
`admin` TINYINT UNSIGNED DEFAULT '0', `admin` TINYINT UNSIGNED DEFAULT '0',
`not_after` DATETIME DEFAULT NULL, `not_after` DATETIME DEFAULT NULL,
@ -82,9 +82,10 @@ CREATE TABLE `api_keys` (
) ENGINE INNODB DEFAULT CHARSET=utf8; ) ENGINE INNODB DEFAULT CHARSET=utf8;
CREATE TABLE `room_keys` ( CREATE TABLE `room_keys` (
`id` INT UNSIGNED NOT NULL, `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`room_id` INT UNSIGNED NOT NULL, `room_id` INT UNSIGNED NOT NULL,
`key_id` INT UNSIGNED NOT NULL, `key_id` INT UNSIGNED NOT NULL,
`role` ENUM('owner', 'participant') DEFAULT 'participant',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE (`room_id`, `key_id`), UNIQUE (`room_id`, `key_id`),
FOREIGN KEY (`room_id`) REFERENCES `rooms` (`id`) FOREIGN KEY (`room_id`) REFERENCES `rooms` (`id`)

Loading…
Cancel
Save