MarwFeatures/Stats/resources/create.sql

13 lines
466 B
MySQL
Raw Normal View History

2018-10-07 03:06:17 +02:00
CREATE TABLE IF NOT EXISTS `{prefix}sessions` (
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-07 03:06:17 +02:00
`ip` int UNSIGNED NOT NULL,
`date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
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;