MarwFeatures/Stats/resources/create.sql

20 lines
675 B
MySQL
Raw Normal View History

2018-10-02 11:36:02 +02:00
CREATE TABLE IF NOT EXISTS `{prefix}players` (
2018-10-06 03:03:07 +02:00
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
2018-10-02 11:36:02 +02:00
`uuid` binary(16) NOT NULL,
`serverNick` varchar(32) NOT NULL,
2018-10-06 03:03:07 +02:00
`voteCount` int UNSIGNED DEFAULT 0,
PRIMARY KEY `id` (`id`),
UNIQUE KEY `uuid` (`uuid`)
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `{prefix}activity` (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`uuid` binary(16) NOT NULL,
`date` DATE NOT NULL,
2018-10-02 11:36:02 +02:00
`kills` int DEFAULT 0,
`deaths` int UNSIGNED DEFAULT 0,
2018-10-06 03:03:07 +02:00
`playtime` mediumint UNSIGNED DEFAULT 0,
PRIMARY KEY `id` (`id`),
UNIQUE KEY `date_player` (`uuid`, `date`)
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;