24 lines
722 B
MySQL
24 lines
722 B
MySQL
|
CREATE TABLE `users` (
|
||
|
`id` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||
|
`username` VARCHAR(20) NOT NULL,
|
||
|
`password_hash` CHAR(73) NOT NULL,
|
||
|
PRIMARY KEY (`id`)
|
||
|
) ENGINE=InnoDB CHARSET utf8mb4;
|
||
|
|
||
|
CREATE TABLE `quests` (
|
||
|
`id` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||
|
`canon_title` VARCHAR(300) DEFAULT NULL,
|
||
|
`ident_title` VARCHAR(300) DEFAULT NULL,
|
||
|
`owner_id` SMALLINT UNSIGNED DEFAULT NULL,
|
||
|
`quest_data` MEDIUMTEXT DEFAULT NULL,
|
||
|
PRIMARY KEY (`id`)
|
||
|
) ENGINE=InnoDB CHARSET utf8mb4;
|
||
|
|
||
|
CREATE TABLE `chat_messages` (
|
||
|
`room_id` SMALLINT UNSIGNED NOT NULL,
|
||
|
`name` VARCHAR(20) NOT NULL,
|
||
|
`name_id` SMALLINT UNSIGNED DEFAULT NULL,
|
||
|
`date` INT UNSIGNED NOT NULL,
|
||
|
`message` TEXT NOT NULL
|
||
|
) ENGINE=InnoDB CHARSET utf8mb4;
|