Commit 7cb2ab0e authored by Matthieu - Greep's avatar Matthieu - Greep

Create database structure

parent 354ed5c0
Pipeline #452 passed with stage
in 47 seconds
CREATE DATABASE IF NOT EXISTS `map-karma-api` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
USE `map-karma-api`;
DROP TABLE IF EXISTS `auth`;
CREATE TABLE IF NOT EXISTS `auth` (
`id` int NOT NULL AUTO_INCREMENT,
`token` varchar(256) COLLATE utf8mb4_general_ci NOT NULL,
`description` text COLLATE utf8mb4_general_ci NOT NULL,
`validate` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
DROP TABLE IF EXISTS `votes`;
CREATE TABLE IF NOT EXISTS `votes` (
`map` varchar(128) COLLATE utf8mb4_general_ci NOT NULL,
`player` varchar(128) COLLATE utf8mb4_general_ci NOT NULL,
`vote` int NOT NULL,
`date` varchar(128) COLLATE utf8mb4_general_ci NOT NULL,
PRIMARY KEY (`map`),
UNIQUE KEY `player_map` (`map`(100),`player`(100)) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
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 to comment