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