Walkero0

altislife.sql

Feb 15th, 2024
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.73 KB | None | 0 0
  1. -- phpMyAdmin SQL Dump
  2. -- version 5.2.1
  3. -- https://www.phpmyadmin.net/
  4. --
  5. -- Host: localhost
  6. -- Erstellungszeit: 15. Feb 2024 um 12:43
  7. -- Server-Version: 10.5.23-MariaDB-0+deb11u1
  8. -- PHP-Version: 7.4.33
  9.  
  10. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  11. START TRANSACTION;
  12. SET time_zone = "+00:00";
  13.  
  14.  
  15. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  16. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  17. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  18. /*!40101 SET NAMES utf8mb4 */;
  19.  
  20. --
  21. -- Datenbank: `altislife`
  22. --
  23.  
  24. DELIMITER $$
  25. --
  26. -- Prozeduren
  27. --
  28. CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteDeadVehicles` () BEGIN
  29. DELETE FROM `vehicles` WHERE `alive` = 0;
  30. END$$
  31.  
  32. CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldContainers` () BEGIN
  33. DELETE FROM `containers` WHERE `owned` = 0;
  34. END$$
  35.  
  36. CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldGangs` () BEGIN
  37. DELETE FROM `gangs` WHERE `active` = 0;
  38. END$$
  39.  
  40. CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldHouses` () BEGIN
  41. DELETE FROM `houses` WHERE `owned` = 0;
  42. END$$
  43.  
  44. CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldWanted` () BEGIN
  45. DELETE FROM `wanted` WHERE `active` = 0;
  46. END$$
  47.  
  48. CREATE DEFINER=`root`@`localhost` PROCEDURE `resetLifeVehicles` () BEGIN
  49. UPDATE `vehicles` SET `active`= 0;
  50. END$$
  51.  
  52. DELIMITER ;
  53.  
  54. -- --------------------------------------------------------
  55.  
  56. --
  57. -- Tabellenstruktur für Tabelle `containers`
  58. --
  59.  
  60. CREATE TABLE `containers` (
  61. `id` int(11) NOT NULL,
  62. `pid` varchar(17) NOT NULL,
  63. `classname` varchar(32) NOT NULL,
  64. `pos` varchar(32) DEFAULT NULL,
  65. `inventory` text NOT NULL,
  66. `gear` text NOT NULL,
  67. `dir` varchar(128) DEFAULT NULL,
  68. `active` tinyint(4) NOT NULL DEFAULT 0,
  69. `owned` tinyint(4) NOT NULL DEFAULT 0,
  70. `insert_time` timestamp NOT NULL DEFAULT current_timestamp()
  71. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  72.  
  73. -- --------------------------------------------------------
  74.  
  75. --
  76. -- Tabellenstruktur für Tabelle `gangs`
  77. --
  78.  
  79. CREATE TABLE `gangs` (
  80. `id` int(11) NOT NULL,
  81. `owner` varchar(17) NOT NULL,
  82. `name` varchar(32) DEFAULT NULL,
  83. `members` text DEFAULT NULL,
  84. `maxmembers` int(11) DEFAULT 8,
  85. `bank` int(11) DEFAULT 0,
  86. `active` tinyint(4) NOT NULL DEFAULT 1,
  87. `insert_time` timestamp NOT NULL DEFAULT current_timestamp()
  88. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  89.  
  90. -- --------------------------------------------------------
  91.  
  92. --
  93. -- Tabellenstruktur für Tabelle `houses`
  94. --
  95.  
  96. CREATE TABLE `houses` (
  97. `id` int(11) NOT NULL,
  98. `pid` varchar(17) NOT NULL,
  99. `pos` varchar(32) DEFAULT NULL,
  100. `owned` tinyint(4) DEFAULT 0,
  101. `garage` tinyint(4) NOT NULL DEFAULT 0,
  102. `insert_time` timestamp NOT NULL DEFAULT current_timestamp()
  103. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  104.  
  105. -- --------------------------------------------------------
  106.  
  107. --
  108. -- Tabellenstruktur für Tabelle `players`
  109. --
  110.  
  111. CREATE TABLE `players` (
  112. `uid` int(11) NOT NULL,
  113. `pid` varchar(17) NOT NULL,
  114. `name` varchar(32) NOT NULL,
  115. `aliases` text NOT NULL,
  116. `cash` int(11) NOT NULL DEFAULT 0,
  117. `bankacc` int(11) NOT NULL DEFAULT 0,
  118. `coplevel` enum('0','1','2','3','4','5','6','7') NOT NULL DEFAULT '0',
  119. `mediclevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
  120. `civ_licenses` text NOT NULL,
  121. `cop_licenses` text NOT NULL,
  122. `med_licenses` text NOT NULL,
  123. `civ_gear` text NOT NULL,
  124. `cop_gear` text NOT NULL,
  125. `med_gear` text NOT NULL,
  126. `civ_stats` varchar(25) NOT NULL DEFAULT '"[100,100,0]"',
  127. `cop_stats` varchar(25) NOT NULL DEFAULT '"[100,100,0]"',
  128. `med_stats` varchar(25) NOT NULL DEFAULT '"[100,100,0]"',
  129. `arrested` tinyint(4) NOT NULL DEFAULT 0,
  130. `adminlevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
  131. `donorlevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
  132. `blacklist` tinyint(4) NOT NULL DEFAULT 0,
  133. `civ_alive` tinyint(4) NOT NULL DEFAULT 0,
  134. `civ_position` varchar(32) NOT NULL DEFAULT '"[]"',
  135. `playtime` varchar(32) NOT NULL DEFAULT '"[0,0,0]"',
  136. `insert_time` timestamp NOT NULL DEFAULT current_timestamp(),
  137. `last_seen` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  138. `applesGathered` int(11) DEFAULT 0
  139. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  140.  
  141. --
  142. -- Daten für Tabelle `players`
  143. --
  144.  
  145. INSERT INTO `players` (`uid`, `pid`, `name`, `aliases`, `cash`, `bankacc`, `coplevel`, `mediclevel`, `civ_licenses`, `cop_licenses`, `med_licenses`, `civ_gear`, `cop_gear`, `med_gear`, `civ_stats`, `cop_stats`, `med_stats`, `arrested`, `adminlevel`, `donorlevel`, `blacklist`, `civ_alive`, `civ_position`, `playtime`, `insert_time`, `last_seen`, `applesGathered`) VALUES
  146. (1, '76561198112725571', 'walker', '\"[`walker`]\"', 0, 3700, '0', '0', '\"[[`license_civ_driver`,0],[`license_civ_boat`,0],[`license_civ_pilot`,0],[`license_civ_trucking`,0],[`license_civ_gun`,0],[`license_civ_dive`,0],[`license_civ_home`,0],[`license_civ_oil`,0],[`license_civ_diamond`,0],[`license_civ_salt`,0],[`license_civ_sand`,0],[`license_civ_iron`,0],[`license_civ_copper`,0],[`license_civ_cement`,0],[`license_civ_medmarijuana`,0],[`license_civ_cocaine`,0],[`license_civ_heroin`,0],[`license_civ_marijuana`,0],[`license_civ_rebel`,0]]\"', '\"[]\"', '\"[]\"', '\"[`U_C_Poloshirt_tricolour`,``,``,``,``,[`ItemMap`,`ItemCompass`,`ItemWatch`],``,``,[],[],[],[],[],[],[``,``,``,``],[``,``,``,``],[[`apple`,14]]]\"', '\"[]\"', '\"[]\"', '\"[100,90,0]\"', '\"[100,100,0]\"', '\"[100,100,0]\"', 0, '5', '5', 0, 0, '\"[]\"', '\"[0,0,18]\"', '2024-02-14 22:50:07', '2024-02-14 23:22:52', 0);
  147.  
  148. -- --------------------------------------------------------
  149.  
  150. --
  151. -- Tabellenstruktur für Tabelle `vehicles`
  152. --
  153.  
  154. CREATE TABLE `vehicles` (
  155. `id` int(11) NOT NULL,
  156. `pid` varchar(17) NOT NULL,
  157. `side` varchar(10) NOT NULL,
  158. `classname` varchar(64) NOT NULL,
  159. `type` varchar(16) NOT NULL,
  160. `alive` tinyint(4) NOT NULL DEFAULT 1,
  161. `blacklist` tinyint(4) NOT NULL DEFAULT 0,
  162. `active` tinyint(4) NOT NULL DEFAULT 0,
  163. `plate` mediumint(9) NOT NULL,
  164. `color` int(11) NOT NULL,
  165. `inventory` text NOT NULL,
  166. `gear` text NOT NULL,
  167. `fuel` double NOT NULL DEFAULT 1,
  168. `damage` varchar(256) NOT NULL,
  169. `insert_time` timestamp NOT NULL DEFAULT current_timestamp()
  170. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  171.  
  172. -- --------------------------------------------------------
  173.  
  174. --
  175. -- Tabellenstruktur für Tabelle `wanted`
  176. --
  177.  
  178. CREATE TABLE `wanted` (
  179. `wantedID` varchar(17) NOT NULL,
  180. `wantedName` varchar(32) NOT NULL,
  181. `wantedCrimes` text NOT NULL,
  182. `wantedBounty` int(11) NOT NULL,
  183. `active` tinyint(4) NOT NULL DEFAULT 0,
  184. `insert_time` timestamp NOT NULL DEFAULT current_timestamp()
  185. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  186.  
  187. --
  188. -- Indizes der exportierten Tabellen
  189. --
  190.  
  191. --
  192. -- Indizes für die Tabelle `containers`
  193. --
  194. ALTER TABLE `containers`
  195. ADD PRIMARY KEY (`id`),
  196. ADD KEY `fkIdx_players_containers` (`pid`);
  197.  
  198. --
  199. -- Indizes für die Tabelle `gangs`
  200. --
  201. ALTER TABLE `gangs`
  202. ADD PRIMARY KEY (`id`),
  203. ADD UNIQUE KEY `unique_name` (`name`),
  204. ADD KEY `fkIdx_players_gangs` (`owner`);
  205.  
  206. --
  207. -- Indizes für die Tabelle `houses`
  208. --
  209. ALTER TABLE `houses`
  210. ADD PRIMARY KEY (`id`),
  211. ADD KEY `fkIdx_players_houses` (`pid`);
  212.  
  213. --
  214. -- Indizes für die Tabelle `players`
  215. --
  216. ALTER TABLE `players`
  217. ADD PRIMARY KEY (`pid`),
  218. ADD UNIQUE KEY `unique_uid` (`uid`),
  219. ADD KEY `index_name` (`name`),
  220. ADD KEY `index_blacklist` (`blacklist`);
  221.  
  222. --
  223. -- Indizes für die Tabelle `vehicles`
  224. --
  225. ALTER TABLE `vehicles`
  226. ADD PRIMARY KEY (`id`),
  227. ADD KEY `fkIdx_players_vehicles` (`pid`),
  228. ADD KEY `index_side` (`side`),
  229. ADD KEY `index_type` (`type`);
  230.  
  231. --
  232. -- Indizes für die Tabelle `wanted`
  233. --
  234. ALTER TABLE `wanted`
  235. ADD PRIMARY KEY (`wantedID`);
  236.  
  237. --
  238. -- AUTO_INCREMENT für exportierte Tabellen
  239. --
  240.  
  241. --
  242. -- AUTO_INCREMENT für Tabelle `containers`
  243. --
  244. ALTER TABLE `containers`
  245. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  246.  
  247. --
  248. -- AUTO_INCREMENT für Tabelle `gangs`
  249. --
  250. ALTER TABLE `gangs`
  251. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  252.  
  253. --
  254. -- AUTO_INCREMENT für Tabelle `houses`
  255. --
  256. ALTER TABLE `houses`
  257. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  258.  
  259. --
  260. -- AUTO_INCREMENT für Tabelle `players`
  261. --
  262. ALTER TABLE `players`
  263. MODIFY `uid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  264.  
  265. --
  266. -- AUTO_INCREMENT für Tabelle `vehicles`
  267. --
  268. ALTER TABLE `vehicles`
  269. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  270.  
  271. --
  272. -- Constraints der exportierten Tabellen
  273. --
  274.  
  275. --
  276. -- Constraints der Tabelle `containers`
  277. --
  278. ALTER TABLE `containers`
  279. ADD CONSTRAINT `FK_players_containers` FOREIGN KEY (`pid`) REFERENCES `players` (`pid`) ON DELETE CASCADE ON UPDATE CASCADE;
  280.  
  281. --
  282. -- Constraints der Tabelle `gangs`
  283. --
  284. ALTER TABLE `gangs`
  285. ADD CONSTRAINT `FK_players_gangs` FOREIGN KEY (`owner`) REFERENCES `players` (`pid`) ON DELETE CASCADE ON UPDATE CASCADE;
  286.  
  287. --
  288. -- Constraints der Tabelle `houses`
  289. --
  290. ALTER TABLE `houses`
  291. ADD CONSTRAINT `FK_players_houses` FOREIGN KEY (`pid`) REFERENCES `players` (`pid`) ON DELETE CASCADE ON UPDATE CASCADE;
  292.  
  293. --
  294. -- Constraints der Tabelle `vehicles`
  295. --
  296. ALTER TABLE `vehicles`
  297. ADD CONSTRAINT `FK_players_vehicles` FOREIGN KEY (`pid`) REFERENCES `players` (`pid`) ON DELETE CASCADE ON UPDATE CASCADE;
  298.  
  299. --
  300. -- Constraints der Tabelle `wanted`
  301. --
  302. ALTER TABLE `wanted`
  303. ADD CONSTRAINT `FK_players_wanted` FOREIGN KEY (`wantedID`) REFERENCES `players` (`pid`) ON DELETE CASCADE ON UPDATE CASCADE;
  304. COMMIT;
  305.  
  306. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  307. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  308. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  309.  
Advertisement
Add Comment
Please, Sign In to add comment