Advertisement
Guest User

Untitled

a guest
Apr 27th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.90 KB | None | 0 0
  1. /*
  2. Navicat MySQL Data Transfer
  3.  
  4. Source Server : altislife
  5. Source Server Version : 50718
  6. Source Host : localhost:3306
  7. Source Database : altislife
  8.  
  9. Target Server Type : MYSQL
  10. Target Server Version : 50718
  11. File Encoding : 65001
  12.  
  13. Date: 2017-07-21 23:44:12
  14. */
  15.  
  16. SET FOREIGN_KEY_CHECKS=0;
  17.  
  18. CREATE DATABASE IF NOT EXISTS `altislife` DEFAULT CHARACTER SET utf8mb4;
  19. USE `altislife`;
  20.  
  21. CREATE USER IF NOT EXISTS `arma3`@`localhost` IDENTIFIED BY 'thomas';
  22.  
  23. GRANT SELECT,UPDATE,INSERT,DELETE ON `altislife`.* TO 'arma3'@'localhost';
  24. GRANT EXECUTE ON altislife.* TO 'arma3'@'localhost';
  25.  
  26. -- ----------------------------
  27. -- Table structure for `containers`
  28. -- ----------------------------
  29. DROP TABLE IF EXISTS `containers`;
  30. CREATE TABLE `containers` (
  31. `id` int(6) NOT NULL AUTO_INCREMENT,
  32. `pid` varchar(17) NOT NULL,
  33. `classname` varchar(32) NOT NULL,
  34. `pos` varchar(64) DEFAULT NULL,
  35. `inventory` text NOT NULL,
  36. `gear` text NOT NULL,
  37. `dir` varchar(128) DEFAULT NULL,
  38. `active` tinyint(1) NOT NULL DEFAULT '0',
  39. `owned` tinyint(1) DEFAULT '0',
  40. `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  41. PRIMARY KEY (`id`,`pid`)
  42. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  43.  
  44. -- ----------------------------
  45. -- Records of containers
  46. -- ----------------------------
  47.  
  48. -- ----------------------------
  49. -- Table structure for `gangs`
  50. -- ----------------------------
  51. DROP TABLE IF EXISTS `gangs`;
  52. CREATE TABLE `gangs` (
  53. `id` int(6) NOT NULL AUTO_INCREMENT,
  54. `owner` varchar(32) DEFAULT NULL,
  55. `name` varchar(32) DEFAULT NULL,
  56. `members` text,
  57. `maxmembers` int(3) DEFAULT '8',
  58. `bank` int(100) DEFAULT '0',
  59. `active` tinyint(1) DEFAULT '1',
  60. `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  61. PRIMARY KEY (`id`),
  62. UNIQUE KEY `name_UNIQUE` (`name`)
  63. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  64.  
  65. -- ----------------------------
  66. -- Records of gangs
  67. -- ----------------------------
  68.  
  69. -- ----------------------------
  70. -- Table structure for `houses`
  71. -- ----------------------------
  72. DROP TABLE IF EXISTS `houses`;
  73. CREATE TABLE `houses` (
  74. `id` int(6) NOT NULL AUTO_INCREMENT,
  75. `pid` varchar(17) NOT NULL,
  76. `pos` varchar(64) DEFAULT NULL,
  77. `owned` tinyint(1) DEFAULT '0',
  78. `garage` tinyint(1) NOT NULL DEFAULT '0',
  79. `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  80. PRIMARY KEY (`id`,`pid`)
  81. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  82.  
  83. -- ----------------------------
  84. -- Records of houses
  85. -- ----------------------------
  86.  
  87. -- ----------------------------
  88. -- Table structure for `messages`
  89. -- ----------------------------
  90. DROP TABLE IF EXISTS `messages`;
  91. CREATE TABLE `messages` (
  92. `uid` int(12) NOT NULL AUTO_INCREMENT,
  93. `fromID` varchar(50) NOT NULL,
  94. `toID` varchar(50) NOT NULL,
  95. `message` text,
  96. `fromName` varchar(32) NOT NULL,
  97. `toName` varchar(32) NOT NULL,
  98. `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  99. PRIMARY KEY (`uid`)
  100. ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;
  101.  
  102. -- ----------------------------
  103. -- Records of messages
  104. -- ----------------------------
  105.  
  106. -- ----------------------------
  107. -- Table structure for `players`
  108. -- ----------------------------
  109. DROP TABLE IF EXISTS `players`;
  110. CREATE TABLE `players` (
  111. `uid` int(6) NOT NULL AUTO_INCREMENT,
  112. `name` varchar(32) NOT NULL,
  113. `aliases` text NOT NULL,
  114. `pid` varchar(17) NOT NULL,
  115. `cash` int(100) NOT NULL DEFAULT '0',
  116. `bankacc` int(100) NOT NULL DEFAULT '0',
  117. `coplevel` enum('0','1','2','3','4','5','6','7') NOT NULL DEFAULT '0',
  118. `mediclevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
  119. `civ_licenses` text NOT NULL,
  120. `cop_licenses` text NOT NULL,
  121. `med_licenses` text NOT NULL,
  122. `civ_gear` text NOT NULL,
  123. `cop_gear` text NOT NULL,
  124. `med_gear` text NOT NULL,
  125. `civ_stats` varchar(32) NOT NULL DEFAULT '"[100,100,0]"',
  126. `cop_stats` varchar(32) NOT NULL DEFAULT '"[100,100,0]"',
  127. `med_stats` varchar(32) NOT NULL DEFAULT '"[100,100,0]"',
  128. `arrested` tinyint(1) NOT NULL DEFAULT '0',
  129. `adminlevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
  130. `donorlevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
  131. `blacklist` tinyint(1) NOT NULL DEFAULT '0',
  132. `civ_alive` tinyint(1) NOT NULL DEFAULT '0',
  133. `civ_position` varchar(64) NOT NULL DEFAULT '"[]"',
  134. `playtime` varchar(32) NOT NULL DEFAULT '"[0,0,0]"',
  135. `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  136. `last_seen` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  137. PRIMARY KEY (`uid`),
  138. UNIQUE KEY `pid` (`pid`),
  139. KEY `name` (`name`),
  140. KEY `blacklist` (`blacklist`)
  141. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;
  142.  
  143. -- ----------------------------
  144. -- Table structure for `vehicles`
  145. -- ----------------------------
  146. DROP TABLE IF EXISTS `vehicles`;
  147. CREATE TABLE `vehicles` (
  148. `id` int(6) NOT NULL AUTO_INCREMENT,
  149. `side` varchar(16) NOT NULL,
  150. `classname` varchar(64) NOT NULL,
  151. `type` varchar(16) NOT NULL,
  152. `pid` varchar(17) NOT NULL,
  153. `alive` tinyint(1) NOT NULL DEFAULT '1',
  154. `blacklist` tinyint(1) NOT NULL DEFAULT '0',
  155. `active` tinyint(1) NOT NULL DEFAULT '0',
  156. `plate` int(20) NOT NULL,
  157. `color` int(20) NOT NULL,
  158. `inventory` text NOT NULL,
  159. `gear` text NOT NULL,
  160. `fuel` double NOT NULL DEFAULT '1',
  161. `damage` varchar(256) NOT NULL,
  162. `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  163. PRIMARY KEY (`id`),
  164. KEY `side` (`side`),
  165. KEY `pid` (`pid`),
  166. KEY `type` (`type`)
  167. ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4;
  168.  
  169. -- ----------------------------
  170. -- Table structure for `wanted`
  171. -- ----------------------------
  172. DROP TABLE IF EXISTS `wanted`;
  173. CREATE TABLE `wanted` (
  174. `wantedID` varchar(64) NOT NULL,
  175. `wantedName` varchar(32) NOT NULL,
  176. `wantedCrimes` text NOT NULL,
  177. `wantedBounty` int(100) NOT NULL,
  178. `active` tinyint(1) NOT NULL DEFAULT '0',
  179. `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  180. PRIMARY KEY (`wantedID`)
  181. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  182.  
  183. -- ----------------------------
  184. -- Records of wanted
  185. -- ----------------------------
  186.  
  187. -- ----------------------------
  188. -- Procedure structure for `deleteDeadVehicles`
  189. -- ----------------------------
  190. DROP PROCEDURE IF EXISTS `deleteDeadVehicles`;
  191. DELIMITER ;;
  192. CREATE DEFINER=`arma3`@`localhost` PROCEDURE `deleteDeadVehicles`()
  193. BEGIN
  194. DELETE FROM `vehicles` WHERE `alive` = 0;
  195. END
  196. ;;
  197. DELIMITER ;
  198.  
  199. -- ----------------------------
  200. -- Procedure structure for `deleteOldContainers`
  201. -- ----------------------------
  202. DROP PROCEDURE IF EXISTS `deleteOldContainers`;
  203. DELIMITER ;;
  204. CREATE DEFINER=`arma3`@`localhost` PROCEDURE `deleteOldContainers`()
  205. BEGIN
  206. DELETE FROM `containers` WHERE `owned` = 0;
  207. END
  208. ;;
  209. DELIMITER ;
  210.  
  211. -- ----------------------------
  212. -- Procedure structure for `deleteOldGangs`
  213. -- ----------------------------
  214. DROP PROCEDURE IF EXISTS `deleteOldGangs`;
  215. DELIMITER ;;
  216. CREATE DEFINER=`arma3`@`localhost` PROCEDURE `deleteOldGangs`()
  217. BEGIN
  218. DELETE FROM `gangs` WHERE `active` = 0;
  219. END
  220. ;;
  221. DELIMITER ;
  222.  
  223. -- ----------------------------
  224. -- Procedure structure for `deleteOldHouses`
  225. -- ----------------------------
  226. DROP PROCEDURE IF EXISTS `deleteOldHouses`;
  227. DELIMITER ;;
  228. CREATE DEFINER=`arma3`@`localhost` PROCEDURE `deleteOldHouses`()
  229. BEGIN
  230. DELETE FROM `houses` WHERE `owned` = 0;
  231. END
  232. ;;
  233. DELIMITER ;
  234.  
  235. -- ----------------------------
  236. -- Procedure structure for `deleteOldWanted`
  237. -- ----------------------------
  238. DROP PROCEDURE IF EXISTS `deleteOldWanted`;
  239. DELIMITER ;;
  240. CREATE DEFINER=`arma3`@`localhost` PROCEDURE `deleteOldWanted`()
  241. BEGIN
  242. DELETE FROM `wanted` WHERE `active` = 0;
  243. END
  244. ;;
  245. DELIMITER ;
  246.  
  247. -- ----------------------------
  248. -- Procedure structure for `resetLifeVehicles`
  249. -- ----------------------------
  250. DROP PROCEDURE IF EXISTS `resetLifeVehicles`;
  251. DELIMITER ;;
  252. CREATE DEFINER=`arma3`@`localhost` PROCEDURE `resetLifeVehicles`()
  253. BEGIN
  254. UPDATE `vehicles` SET `active`= 0;
  255. END
  256. ;;
  257. DELIMITER ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement