· 9 years ago · Oct 28, 2016, 04:22 PM
1-- --------------------------------------------------------
2-- Host: 127.0.0.1
3-- Server version: 5.6.25 - MySQL Community Server (GPL)
4-- Server OS: Win32
5-- HeidiSQL Version: 9.1.0.4867
6-- --------------------------------------------------------
7
8/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
9/*!40101 SET NAMES utf8mb4 */;
10/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
11/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
12
13-- Dumping database structure for life
14DROP DATABASE IF EXISTS `life`;
15CREATE DATABASE IF NOT EXISTS `life` /*!40100 DEFAULT CHARACTER SET utf8 */;
16USE `life`;
17
18
19-- Dumping structure for table life.bans
20CREATE TABLE IF NOT EXISTS `bans` (
21 `id` int(11) NOT NULL AUTO_INCREMENT,
22 `banuid` varchar(50) NOT NULL DEFAULT '',
23 `adminuid` varchar(50) NOT NULL DEFAULT '',
24 `isperm` int(11) NOT NULL DEFAULT '0',
25 `added` varchar(50) NOT NULL DEFAULT '0',
26 `time` int(11) NOT NULL DEFAULT '0',
27 `reason` varchar(500) NOT NULL DEFAULT '',
28 UNIQUE KEY `id` (`id`)
29) ENGINE=InnoDB DEFAULT CHARSET=utf8;
30
31-- Data exporting was unselected.
32
33
34-- Dumping structure for procedure life.deleteDeadVehicles
35DELIMITER //
36CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteDeadVehicles`()
37BEGIN
38 DELETE FROM `vehicles` WHERE `alive` = 0;
39END//
40DELIMITER ;
41
42
43-- Dumping structure for procedure life.deleteOldHouses
44DELIMITER //
45CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldHouses`()
46BEGIN
47 DELETE FROM `houses` WHERE `owned` = 0;
48END//
49DELIMITER ;
50
51
52-- Dumping structure for table life.gangs
53CREATE TABLE IF NOT EXISTS `gangs` (
54 `id` int(11) NOT NULL AUTO_INCREMENT,
55 `owner` varchar(32) DEFAULT NULL,
56 `name` varchar(32) DEFAULT NULL,
57 `members` text,
58 `maxmembers` int(2) DEFAULT '8',
59 `bank` int(100) DEFAULT '0',
60 `active` tinyint(4) DEFAULT '1',
61 PRIMARY KEY (`id`),
62 UNIQUE KEY `name_UNIQUE` (`name`)
63) ENGINE=InnoDB DEFAULT CHARSET=latin1;
64
65-- Data exporting was unselected.
66
67
68-- Dumping structure for table life.houses
69CREATE TABLE IF NOT EXISTS `houses` (
70 `id` int(11) NOT NULL AUTO_INCREMENT,
71 `pid` varchar(32) NOT NULL,
72 `pos` varchar(64) DEFAULT NULL,
73 `inventory` text,
74 `containers` text,
75 `owned` tinyint(4) DEFAULT '0',
76 `shared1` text,
77 `shared2` text,
78 `shared3` text,
79 `shared4` text,
80 `shared5` text,
81 PRIMARY KEY (`id`,`pid`)
82) ENGINE=InnoDB DEFAULT CHARSET=latin1;
83
84-- Data exporting was unselected.
85
86
87-- Dumping structure for table life.launcher
88CREATE TABLE IF NOT EXISTS `launcher` (
89 `server_ip` varchar(15) DEFAULT NULL,
90 `launcher_path` varchar(255) DEFAULT NULL,
91 `ts3_plugin_path` varchar(255) DEFAULT NULL,
92 `mod_path` varchar(255) DEFAULT NULL,
93 `ftp_userid` varchar(255) DEFAULT NULL,
94 `ftp_pass` varchar(255) DEFAULT NULL,
95 `hashes_path` varchar(255) DEFAULT NULL,
96 `servers_path` varchar(255) DEFAULT NULL
97) ENGINE=InnoDB DEFAULT CHARSET=utf8;
98
99-- Data exporting was unselected.
100
101
102-- Dumping structure for table life.panellog
103CREATE TABLE IF NOT EXISTS `panellog` (
104 `uid` int(12) NOT NULL AUTO_INCREMENT,
105 `date` varchar(32) NOT NULL,
106 `author` varchar(32) NOT NULL,
107 `pname` varchar(32) NOT NULL,
108 `pid` varchar(50) NOT NULL,
109 `bankacc` int(100) NOT NULL DEFAULT '0',
110 `cash` int(100) NOT NULL DEFAULT '0',
111 `obankacc` int(100) NOT NULL DEFAULT '0',
112 `ocash` int(100) NOT NULL DEFAULT '0',
113 `coplevel` enum('0','1','2','3','4','5','6','7') DEFAULT '0',
114 `mediclevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
115 PRIMARY KEY (`uid`),
116 KEY `pname` (`pname`),
117 KEY `author` (`author`)
118) ENGINE=InnoDB DEFAULT CHARSET=latin1;
119
120-- Data exporting was unselected.
121
122
123-- Dumping structure for table life.players
124CREATE TABLE IF NOT EXISTS `players` (
125 `uid` int(12) NOT NULL AUTO_INCREMENT,
126 `name` varchar(32) NOT NULL,
127 `playerid` varchar(50) NOT NULL,
128 `cash` int(100) NOT NULL DEFAULT '0',
129 `bankacc` int(100) NOT NULL DEFAULT '0',
130 `coplevel` enum('0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15') DEFAULT '0',
131 `cop_licenses` text,
132 `civ_licenses` text,
133 `med_licenses` text,
134 `cop_gear` text NOT NULL,
135 `mediclevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
136 `arrested` tinyint(1) NOT NULL DEFAULT '0',
137 `aliases` text NOT NULL,
138 `adminlevel` enum('0','1','2','3') NOT NULL DEFAULT '0',
139 `donatorlvl` int(100) NOT NULL DEFAULT '0',
140 `civ_gear` text NOT NULL,
141 `blacklist` tinyint(1) NOT NULL DEFAULT '0',
142 `admin_user` varchar(50) DEFAULT NULL,
143 `admin_pass` varchar(50) DEFAULT NULL,
144 `timeupdated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
145 `timejoined` datetime DEFAULT NULL,
146 `med_gear` text NOT NULL,
147 `issupport` enum('0','1') NOT NULL DEFAULT '0',
148 `jailtime` int(11) NOT NULL DEFAULT '0',
149 `arrestreason` varchar(150) NOT NULL,
150 `streamSaftey` tinyint(1) NOT NULL DEFAULT '0',
151 PRIMARY KEY (`uid`),
152 UNIQUE KEY `playerid` (`playerid`),
153 KEY `name` (`name`),
154 KEY `blacklist` (`blacklist`)
155) ENGINE=InnoDB DEFAULT CHARSET=latin1;
156
157-- Data exporting was unselected.
158
159
160-- Dumping structure for procedure life.resetLifeVehicles
161DELIMITER //
162CREATE DEFINER=`root`@`localhost` PROCEDURE `resetLifeVehicles`()
163BEGIN
164 UPDATE vehicles SET `active`= 0;
165END//
166DELIMITER ;
167
168
169-- Dumping structure for table life.servers
170CREATE TABLE IF NOT EXISTS `servers` (
171 `id` int(11) NOT NULL AUTO_INCREMENT,
172 `name` varchar(255) DEFAULT NULL,
173 `ip` varchar(55) DEFAULT NULL,
174 `port` varchar(10) DEFAULT NULL,
175 `password` varchar(255) DEFAULT NULL,
176 `status` varchar(5) DEFAULT NULL,
177 PRIMARY KEY (`id`)
178) ENGINE=InnoDB DEFAULT CHARSET=utf8;
179
180-- Data exporting was unselected.
181
182
183-- Dumping structure for table life.users
184CREATE TABLE IF NOT EXISTS `users` (
185 `user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'auto incrementing user_id of each user, unique index',
186 `user_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'user''s name, unique',
187 `user_password_hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'user''s password in salted and hashed format',
188 `user_email` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'user''s email, unique',
189 `playerid` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
190 `user_level` enum('1','2') COLLATE utf8_unicode_ci NOT NULL DEFAULT '1',
191 PRIMARY KEY (`user_id`),
192 UNIQUE KEY `user_name` (`user_name`),
193 UNIQUE KEY `user_email` (`user_email`)
194) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='user data';
195
196-- Data exporting was unselected.
197
198
199-- Dumping structure for table life.vehicles
200CREATE TABLE IF NOT EXISTS `vehicles` (
201 `id` int(12) NOT NULL AUTO_INCREMENT,
202 `side` varchar(15) NOT NULL,
203 `classname` varchar(32) NOT NULL,
204 `type` varchar(12) NOT NULL,
205 `pid` varchar(32) NOT NULL,
206 `alive` tinyint(1) NOT NULL DEFAULT '1',
207 `active` tinyint(1) NOT NULL DEFAULT '0',
208 `plate` int(20) NOT NULL,
209 `color` int(20) NOT NULL,
210 `inventory` varchar(500) NOT NULL,
211 PRIMARY KEY (`id`),
212 KEY `side` (`side`),
213 KEY `pid` (`pid`),
214 KEY `type` (`type`)
215) ENGINE=InnoDB DEFAULT CHARSET=latin1;
216
217-- Data exporting was unselected.
218
219
220-- Dumping structure for trigger life.player_create
221SET @OLDTMP_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
222DELIMITER //
223CREATE TRIGGER `player_create` BEFORE INSERT ON `players` FOR EACH ROW SET NEW.timejoined = NOW()//
224DELIMITER ;
225SET SQL_MODE=@OLDTMP_SQL_MODE;
226/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
227/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
228/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;