Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Navicat MySQL Data Transfer
- Source Server : SERVER
- Source Server Version : 50715
- Source Host : 127.0.0.1:3306
- Source Database : exile
- Target Server Type : MYSQL
- Target Server Version : 50715
- File Encoding : 65001
- Date: 2016-12-21 14:32:23
- */
- SET FOREIGN_KEY_CHECKS=0;
- -- ----------------------------
- -- Table structure for account
- -- ----------------------------
- DROP TABLE IF EXISTS `account`;
- CREATE TABLE `account` (
- `uid` varchar(32) NOT NULL,
- `clan_id` int(11) unsigned DEFAULT NULL,
- `name` varchar(64) NOT NULL,
- `score` int(11) NOT NULL DEFAULT '0',
- `kills` int(11) unsigned NOT NULL DEFAULT '0',
- `killsM` int(11) unsigned NOT NULL DEFAULT '0',
- `zedkills` int(11) unsigned NOT NULL DEFAULT '0',
- `deaths` int(11) unsigned NOT NULL DEFAULT '0',
- `locker` int(11) NOT NULL DEFAULT '50000',
- `first_connect_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `last_connect_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `last_disconnect_at` datetime DEFAULT NULL,
- `last_reward_at` datetime DEFAULT '0000-00-00 00:00:00',
- `total_connections` int(11) unsigned NOT NULL DEFAULT '1',
- `whitelisted` int(1) unsigned NOT NULL DEFAULT '0',
- PRIMARY KEY (`uid`),
- KEY `clan_id` (`clan_id`) USING BTREE,
- CONSTRAINT `account_ibfk_1` FOREIGN KEY (`clan_id`) REFERENCES `clan` (`id`) ON DELETE SET NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Table structure for clan
- -- ----------------------------
- DROP TABLE IF EXISTS `clan`;
- CREATE TABLE `clan` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(64) NOT NULL,
- `leader_uid` varchar(32) NOT NULL,
- `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`),
- KEY `leader_uid` (`leader_uid`) USING BTREE,
- CONSTRAINT `clan_ibfk_1` FOREIGN KEY (`leader_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Table structure for clan_map_marker
- -- ----------------------------
- DROP TABLE IF EXISTS `clan_map_marker`;
- CREATE TABLE `clan_map_marker` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `clan_id` int(11) unsigned NOT NULL,
- `markerType` tinyint(4) NOT NULL DEFAULT '-1',
- `positionArr` text NOT NULL,
- `color` varchar(255) NOT NULL,
- `icon` varchar(255) NOT NULL,
- `iconSize` float unsigned NOT NULL,
- `label` varchar(255) NOT NULL,
- `labelSize` float unsigned NOT NULL,
- PRIMARY KEY (`id`),
- KEY `clan_id` (`clan_id`) USING BTREE,
- CONSTRAINT `clan_map_marker_ibfk_1` FOREIGN KEY (`clan_id`) REFERENCES `clan` (`id`) ON DELETE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Table structure for construction
- -- ----------------------------
- DROP TABLE IF EXISTS `construction`;
- CREATE TABLE `construction` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `class` varchar(64) NOT NULL,
- `account_uid` varchar(32) NOT NULL,
- `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `position_x` double NOT NULL DEFAULT '0',
- `position_y` double NOT NULL DEFAULT '0',
- `position_z` double NOT NULL DEFAULT '0',
- `direction_x` double NOT NULL DEFAULT '0',
- `direction_y` double NOT NULL DEFAULT '0',
- `direction_z` double NOT NULL DEFAULT '0',
- `up_x` double NOT NULL DEFAULT '0',
- `up_y` double NOT NULL DEFAULT '0',
- `up_z` double NOT NULL DEFAULT '0',
- `is_locked` tinyint(1) NOT NULL DEFAULT '0',
- `pin_code` varchar(6) NOT NULL DEFAULT '000000',
- `damage` tinyint(1) unsigned DEFAULT '0',
- `texture` varchar(255) NOT NULL,
- `territory_id` int(11) unsigned DEFAULT NULL,
- `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `deleted_at` datetime DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `account_uid` (`account_uid`) USING BTREE,
- KEY `territory_id` (`territory_id`) USING BTREE,
- CONSTRAINT `construction_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
- CONSTRAINT `construction_ibfk_2` FOREIGN KEY (`territory_id`) REFERENCES `territory` (`id`) ON DELETE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=10782 DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Table structure for container
- -- ----------------------------
- DROP TABLE IF EXISTS `container`;
- CREATE TABLE `container` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `class` varchar(64) NOT NULL,
- `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `account_uid` varchar(32) DEFAULT NULL,
- `is_locked` tinyint(1) NOT NULL DEFAULT '0',
- `position_x` double NOT NULL DEFAULT '0',
- `position_y` double NOT NULL DEFAULT '0',
- `position_z` double NOT NULL DEFAULT '0',
- `direction_x` double NOT NULL DEFAULT '0',
- `direction_y` double NOT NULL DEFAULT '0',
- `direction_z` double NOT NULL DEFAULT '0',
- `up_x` double NOT NULL DEFAULT '0',
- `up_y` double NOT NULL DEFAULT '0',
- `up_z` double NOT NULL DEFAULT '1',
- `cargo_items` text NOT NULL,
- `cargo_magazines` text NOT NULL,
- `cargo_weapons` text NOT NULL,
- `cargo_container` text NOT NULL,
- `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `pin_code` varchar(6) NOT NULL DEFAULT '000000',
- `territory_id` int(11) unsigned DEFAULT NULL,
- `deleted_at` datetime DEFAULT NULL,
- `money` int(11) unsigned NOT NULL DEFAULT '0',
- `abandoned` datetime DEFAULT NULL,
- `is_trap` tinyint(1) NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`),
- KEY `account_uid` (`account_uid`) USING BTREE,
- KEY `territory_id` (`territory_id`) USING BTREE,
- CONSTRAINT `container_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
- CONSTRAINT `container_ibfk_2` FOREIGN KEY (`territory_id`) REFERENCES `territory` (`id`) ON DELETE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=1266 DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Table structure for infistar_logs
- -- ----------------------------
- DROP TABLE IF EXISTS `infistar_logs`;
- CREATE TABLE `infistar_logs` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `logname` char(50) NOT NULL,
- `logentry` text NOT NULL,
- `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- -- ----------------------------
- -- Table structure for marxet
- -- ----------------------------
- DROP TABLE IF EXISTS `marxet`;
- CREATE TABLE `marxet` (
- `listingID` varchar(8) NOT NULL,
- `itemAvailable` tinyint(1) NOT NULL DEFAULT '1',
- `itemArray` text NOT NULL,
- `price` double NOT NULL,
- `sellerUID` varchar(64) NOT NULL,
- `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`listingID`),
- KEY `listingID` (`listingID`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Table structure for player
- -- ----------------------------
- DROP TABLE IF EXISTS `player`;
- CREATE TABLE `player` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(64) NOT NULL,
- `account_uid` varchar(32) NOT NULL,
- `money` int(11) unsigned NOT NULL DEFAULT '0',
- `damage` double unsigned NOT NULL DEFAULT '0',
- `hunger` double unsigned NOT NULL DEFAULT '100',
- `thirst` double unsigned NOT NULL DEFAULT '100',
- `alcohol` double unsigned NOT NULL DEFAULT '0',
- `temperature` double NOT NULL DEFAULT '37',
- `wetness` double unsigned NOT NULL DEFAULT '0',
- `oxygen_remaining` double unsigned NOT NULL DEFAULT '1',
- `bleeding_remaining` double unsigned NOT NULL DEFAULT '0',
- `hitpoints` varchar(255) NOT NULL DEFAULT '[]',
- `direction` double NOT NULL DEFAULT '0',
- `position_x` double NOT NULL DEFAULT '0',
- `position_y` double NOT NULL DEFAULT '0',
- `position_z` double NOT NULL DEFAULT '0',
- `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `assigned_items` text NOT NULL,
- `backpack` varchar(64) NOT NULL,
- `backpack_items` text NOT NULL,
- `backpack_magazines` text NOT NULL,
- `backpack_weapons` text NOT NULL,
- `current_weapon` varchar(64) NOT NULL,
- `goggles` varchar(64) NOT NULL,
- `handgun_items` text NOT NULL,
- `handgun_weapon` varchar(64) NOT NULL,
- `headgear` varchar(64) NOT NULL,
- `binocular` varchar(64) NOT NULL,
- `loaded_magazines` text NOT NULL,
- `primary_weapon` varchar(64) NOT NULL,
- `primary_weapon_items` text NOT NULL,
- `secondary_weapon` varchar(64) NOT NULL,
- `secondary_weapon_items` text NOT NULL,
- `uniform` varchar(64) NOT NULL,
- `uniform_items` text NOT NULL,
- `uniform_magazines` text NOT NULL,
- `uniform_weapons` text NOT NULL,
- `vest` varchar(64) NOT NULL,
- `vest_items` text NOT NULL,
- `vest_magazines` text NOT NULL,
- `vest_weapons` text NOT NULL,
- `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`),
- KEY `player_uid` (`account_uid`) USING BTREE,
- CONSTRAINT `player_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=8951 DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Table structure for player_history
- -- ----------------------------
- DROP TABLE IF EXISTS `player_history`;
- CREATE TABLE `player_history` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `account_uid` varchar(32) NOT NULL,
- `name` varchar(64) NOT NULL,
- `died_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `position_x` double NOT NULL,
- `position_y` double NOT NULL,
- `position_z` double NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=8237 DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Table structure for raid_history
- -- ----------------------------
- DROP TABLE IF EXISTS `raid_history`;
- CREATE TABLE `raid_history` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `owner` varchar(32) NOT NULL,
- `thief` varchar(64) NOT NULL,
- `territory_id` int(11) NOT NULL,
- `position_x` double NOT NULL,
- `position_y` double NOT NULL,
- `position_z` double NOT NULL,
- `object` varchar(64) NOT NULL,
- `type` varchar(20) NOT NULL,
- `object_type` varchar(20) NOT NULL,
- `datetime` datetime NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- -- ----------------------------
- -- Table structure for territory
- -- ----------------------------
- DROP TABLE IF EXISTS `territory`;
- CREATE TABLE `territory` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `owner_uid` varchar(32) NOT NULL,
- `name` varchar(64) NOT NULL,
- `position_x` double NOT NULL,
- `position_y` double NOT NULL,
- `position_z` double NOT NULL,
- `radius` double NOT NULL,
- `level` int(11) NOT NULL,
- `flag_texture` varchar(255) NOT NULL,
- `flag_stolen` tinyint(1) NOT NULL DEFAULT '0',
- `flag_stolen_by_uid` varchar(32) DEFAULT NULL,
- `flag_stolen_at` datetime DEFAULT NULL,
- `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `last_paid_at` datetime DEFAULT CURRENT_TIMESTAMP,
- `xm8_protectionmoney_notified` tinyint(1) NOT NULL DEFAULT '0',
- `build_rights` varchar(640) NOT NULL DEFAULT '0',
- `moderators` varchar(320) NOT NULL DEFAULT '0',
- `deleted_at` datetime DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `owner_uid` (`owner_uid`) USING BTREE,
- KEY `flag_stolen_by_uid` (`flag_stolen_by_uid`) USING BTREE,
- CONSTRAINT `territory_ibfk_1` FOREIGN KEY (`owner_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
- CONSTRAINT `territory_ibfk_2` FOREIGN KEY (`flag_stolen_by_uid`) REFERENCES `account` (`uid`) ON DELETE SET NULL
- ) ENGINE=InnoDB AUTO_INCREMENT=82 DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Table structure for vehicle
- -- ----------------------------
- DROP TABLE IF EXISTS `vehicle`;
- CREATE TABLE `vehicle` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `class` varchar(64) NOT NULL,
- `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `account_uid` varchar(32) DEFAULT NULL,
- `is_locked` tinyint(1) NOT NULL DEFAULT '0',
- `fuel` double unsigned NOT NULL DEFAULT '0',
- `damage` double unsigned NOT NULL DEFAULT '0',
- `hitpoints` text NOT NULL,
- `position_x` double NOT NULL DEFAULT '0',
- `position_y` double NOT NULL DEFAULT '0',
- `position_z` double NOT NULL DEFAULT '0',
- `direction_x` double NOT NULL DEFAULT '0',
- `direction_y` double NOT NULL DEFAULT '0',
- `direction_z` double NOT NULL DEFAULT '0',
- `up_x` double NOT NULL DEFAULT '0',
- `up_y` double NOT NULL DEFAULT '0',
- `up_z` double NOT NULL DEFAULT '1',
- `cargo_items` text NOT NULL,
- `cargo_magazines` text NOT NULL,
- `cargo_weapons` text NOT NULL,
- `cargo_container` text NOT NULL,
- `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `pin_code` varchar(6) NOT NULL DEFAULT '000000',
- `deleted_at` datetime DEFAULT NULL,
- `money` int(11) unsigned NOT NULL DEFAULT '0',
- `vehicle_texture` text NOT NULL,
- `territory_id` int(11) unsigned DEFAULT NULL,
- `ammo` text NOT NULL,
- PRIMARY KEY (`id`),
- KEY `account_uid` (`account_uid`) USING BTREE,
- KEY `vehicle_ibfk_2` (`territory_id`) USING BTREE,
- CONSTRAINT `vehicle_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
- CONSTRAINT `vehicle_ibfk_2` FOREIGN KEY (`territory_id`) REFERENCES `territory` (`id`) ON DELETE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=1450 DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Table structure for xg_logkill
- -- ----------------------------
- DROP TABLE IF EXISTS `xg_logkill`;
- CREATE TABLE `xg_logkill` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `victimUID` varchar(32) NOT NULL,
- `victimName` varchar(512) NOT NULL,
- `killerUID` varchar(32) NOT NULL,
- `killerName` varchar(512) NOT NULL,
- `killerWeapon` varchar(512) NOT NULL,
- `killerVehicle` varchar(512) NOT NULL,
- `distance` varchar(512) NOT NULL,
- `died_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- KEY `id` (`id`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=2530 DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Event structure for PLAYER DELETE
- -- ----------------------------
- DROP EVENT IF EXISTS `PLAYER DELETE`;
- DELIMITER ;;
- CREATE DEFINER=`majussiani`@`%` EVENT `PLAYER DELETE` ON SCHEDULE EVERY 2 MINUTE STARTS '2016-12-04 02:09:12' ON COMPLETION NOT PRESERVE ENABLE COMMENT 'APAGA PLAYER DUPLICADO' DO /* =================== DELETES =================== */
- /* DELETE Inactive Players */
- DELETE FROM player
- WHERE account_uid IN (SELECT uid FROM account WHERE last_connect_at < NOW() - INTERVAL 7 DAY
- AND total_connections < 10);
- ;;
- DELIMITER ;
Advertisement
Add Comment
Please, Sign In to add comment