Code (Text):
CREATE TABLE `stats_player` (
`id` bigint(20) NOT NULL,
`name` varchar(256) CHARACTER SET utf8 NOT NULL,
`online_seconds` bigint(20) NOT NULL DEFAULT '0',
`ip` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`online` bit(1) NOT NULL DEFAULT b'0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `stats_player_animal_kill` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`player` bigint(20) NOT NULL,
`animal` varchar(32) NOT NULL,
`date` datetime NOT NULL,
`distance` int(11) DEFAULT NULL,
`weapon` varchar(128) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `stats_player_craft_item` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`player` bigint(20) NOT NULL,
`item` varchar(32) NOT NULL,
`date` date NOT NULL,
`count` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `PlayerItemDate` (`player`,`item`,`date`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `stats_player_death` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`player` bigint(20) NOT NULL,
`cause` varchar(32) NOT NULL,
`date` date NOT NULL,
`count` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `PlayerCauseDate` (`player`,`cause`,`date`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `stats_player_destroy_building` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`player` bigint(20) NOT NULL,
`building` varchar(128) NOT NULL,
`date` datetime NOT NULL,
`tier` varchar(20) DEFAULT NULL,
`weapon` varchar(128) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `stats_player_fire_bullet` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`player` bigint(20) NOT NULL,
`bullet` varchar(32) NOT NULL,
`weapon` varchar(32) NOT NULL,
`date` date NOT NULL,
`count` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `PlayerBulletWeaponDate` (`player`,`bullet`,`weapon`,`date`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `stats_player_gather_resource` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`player` bigint(20) NOT NULL,
`resource` varchar(32) NOT NULL,
`count` bigint(20) NOT NULL,
`date` date NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `PlayerResourceCountDate` (`player`,`resource`,`date`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `stats_player_kill` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`killer` bigint(20) NOT NULL,
`victim` bigint(20) NOT NULL,
`weapon` varchar(32) NOT NULL,
`bodypart` varchar(2000) NOT NULL DEFAULT '',
`date` datetime NOT NULL,
`distance` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `stats_player_place_building` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`player` bigint(20) NOT NULL,
`building` varchar(128) NOT NULL,
`date` date NOT NULL,
`count` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `PlayerBuildingDate` (`player`,`building`,`date`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `stats_player_place_deployable` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`player` bigint(20) NOT NULL,
`deployable` varchar(128) NOT NULL,
`date` date NOT NULL,
`count` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `PlayerDeployableDate` (`player`,`deployable`,`date`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
Link off
ResponderExcluir