Advertisement
Brenner650

nitradoa_3_exile_1_0_4a_fix.sql

Apr 1st, 2021
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.51 KB | None | 0 0
  1.  
  2. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  3.  
  4.  
  5. -- --------------------------------------------------------
  6.  
  7. --
  8. -- Table structure for table `account`
  9. --
  10.  
  11. CREATE TABLE `account` (
  12. `uid` varchar(32) NOT NULL DEFAULT '[]',
  13. `clan_id` int(11) UNSIGNED DEFAULT NULL,
  14. `name` varchar(64) NOT NULL DEFAULT '[]',
  15. `score` int(11) NOT NULL DEFAULT 0,
  16. `kills` int(11) UNSIGNED NOT NULL DEFAULT 0,
  17. `deaths` int(11) UNSIGNED NOT NULL DEFAULT 0,
  18. `locker` int(11) NOT NULL DEFAULT 0,
  19. `first_connect_at` datetime NOT NULL DEFAULT current_timestamp(),
  20. `last_connect_at` datetime NOT NULL DEFAULT current_timestamp(),
  21. `last_disconnect_at` datetime DEFAULT NULL,
  22. `total_connections` int(11) UNSIGNED NOT NULL DEFAULT 1
  23. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  24.  
  25. -- --------------------------------------------------------
  26.  
  27. --
  28. -- Table structure for table `clan`
  29. --
  30.  
  31. CREATE TABLE `clan` (
  32. `id` int(11) UNSIGNED NOT NULL,
  33. `name` varchar(64) NOT NULL DEFAULT '[]',
  34. `leader_uid` varchar(32) NOT NULL DEFAULT '[]',
  35. `created_at` datetime NOT NULL DEFAULT current_timestamp()
  36. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  37.  
  38. -- --------------------------------------------------------
  39.  
  40. --
  41. -- Table structure for table `clan_map_marker`
  42. --
  43.  
  44. CREATE TABLE `clan_map_marker` (
  45. `id` int(11) UNSIGNED NOT NULL,
  46. `clan_id` int(11) UNSIGNED NOT NULL,
  47. `markerType` tinyint(4) NOT NULL DEFAULT -1,
  48. `positionArr` text NOT NULL DEFAULT '[]',
  49. `color` varchar(255) NOT NULL,
  50. `icon` varchar(255) NOT NULL,
  51. `iconSize` float UNSIGNED NOT NULL,
  52. `label` varchar(255) NOT NULL,
  53. `labelSize` float UNSIGNED NOT NULL
  54. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  55.  
  56. -- --------------------------------------------------------
  57.  
  58. --
  59. -- Table structure for table `construction`
  60. --
  61.  
  62. CREATE TABLE `construction` (
  63. `id` int(11) UNSIGNED NOT NULL,
  64. `class` varchar(64) NOT NULL,
  65. `account_uid` varchar(32) NOT NULL,
  66. `spawned_at` datetime NOT NULL DEFAULT current_timestamp(),
  67. `position_x` double NOT NULL DEFAULT 0,
  68. `position_y` double NOT NULL DEFAULT 0,
  69. `position_z` double NOT NULL DEFAULT 0,
  70. `direction_x` double NOT NULL DEFAULT 0,
  71. `direction_y` double NOT NULL DEFAULT 0,
  72. `direction_z` double NOT NULL DEFAULT 0,
  73. `up_x` double NOT NULL DEFAULT 0,
  74. `up_y` double NOT NULL DEFAULT 0,
  75. `up_z` double NOT NULL DEFAULT 0,
  76. `is_locked` tinyint(1) NOT NULL DEFAULT 0,
  77. `pin_code` varchar(6) NOT NULL DEFAULT '000000',
  78. `damage` tinyint(1) UNSIGNED DEFAULT 0,
  79. `territory_id` int(11) UNSIGNED DEFAULT NULL,
  80. `last_updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  81. `deleted_at` datetime DEFAULT NULL
  82. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  83.  
  84. -- --------------------------------------------------------
  85.  
  86. --
  87. -- Table structure for table `container`
  88. --
  89.  
  90. CREATE TABLE `container` (
  91. `id` int(11) UNSIGNED NOT NULL,
  92. `class` varchar(64) NOT NULL,
  93. `spawned_at` datetime NOT NULL DEFAULT current_timestamp(),
  94. `account_uid` varchar(32) DEFAULT NULL,
  95. `is_locked` tinyint(1) NOT NULL DEFAULT 0,
  96. `position_x` double NOT NULL DEFAULT 0,
  97. `position_y` double NOT NULL DEFAULT 0,
  98. `position_z` double NOT NULL DEFAULT 0,
  99. `direction_x` double NOT NULL DEFAULT 0,
  100. `direction_y` double NOT NULL DEFAULT 0,
  101. `direction_z` double NOT NULL DEFAULT 0,
  102. `up_x` double NOT NULL DEFAULT 0,
  103. `up_y` double NOT NULL DEFAULT 0,
  104. `up_z` double NOT NULL DEFAULT 1,
  105. `cargo_items` text NOT NULL DEFAULT '[]',
  106. `cargo_magazines` text NOT NULL DEFAULT '[]',
  107. `cargo_weapons` text NOT NULL DEFAULT '[]',
  108. `cargo_container` text NOT NULL DEFAULT '[]',
  109. `last_updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  110. `pin_code` varchar(6) NOT NULL DEFAULT '000000',
  111. `territory_id` int(11) UNSIGNED DEFAULT NULL,
  112. `deleted_at` datetime DEFAULT NULL,
  113. `money` int(11) UNSIGNED NOT NULL DEFAULT 0,
  114. `abandoned` datetime DEFAULT NULL
  115. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
  116.  
  117. -- --------------------------------------------------------
  118.  
  119. --
  120. -- Table structure for table `player`
  121. --
  122.  
  123. CREATE TABLE `player` (
  124. `id` int(11) UNSIGNED NOT NULL,
  125. `name` varchar(64) NOT NULL,
  126. `account_uid` varchar(32) NOT NULL,
  127. `money` int(11) UNSIGNED NOT NULL DEFAULT 0,
  128. `damage` double UNSIGNED NOT NULL DEFAULT 0,
  129. `hunger` double UNSIGNED NOT NULL DEFAULT 100,
  130. `thirst` double UNSIGNED NOT NULL DEFAULT 100,
  131. `alcohol` double UNSIGNED NOT NULL DEFAULT 0,
  132. `temperature` double NOT NULL DEFAULT 37,
  133. `wetness` double UNSIGNED NOT NULL DEFAULT 0,
  134. `oxygen_remaining` double UNSIGNED NOT NULL DEFAULT 1,
  135. `bleeding_remaining` double UNSIGNED NOT NULL DEFAULT 0,
  136. `hitpoints` varchar(1024) NOT NULL DEFAULT '[]',
  137. `direction` double NOT NULL DEFAULT 0,
  138. `position_x` double NOT NULL DEFAULT 0,
  139. `position_y` double NOT NULL DEFAULT 0,
  140. `position_z` double NOT NULL DEFAULT 0,
  141. `spawned_at` datetime NOT NULL DEFAULT current_timestamp(),
  142. `assigned_items` text NOT NULL DEFAULT '[]',
  143. `backpack` varchar(64) NOT NULL DEFAULT '[]',
  144. `backpack_items` text NOT NULL DEFAULT '[]',
  145. `backpack_magazines` text NOT NULL DEFAULT '[]',
  146. `backpack_weapons` text NOT NULL DEFAULT '[]',
  147. `current_weapon` varchar(64) NOT NULL DEFAULT '[]',
  148. `goggles` varchar(64) NOT NULL DEFAULT '[]',
  149. `handgun_items` text NOT NULL DEFAULT '[]',
  150. `handgun_weapon` varchar(64) NOT NULL DEFAULT '[]',
  151. `headgear` varchar(64) NOT NULL DEFAULT '[]',
  152. `binocular` varchar(64) NOT NULL DEFAULT '[]',
  153. `loaded_magazines` text NOT NULL DEFAULT '[]',
  154. `primary_weapon` varchar(64) NOT NULL DEFAULT '[]',
  155. `primary_weapon_items` text NOT NULL DEFAULT '[]',
  156. `secondary_weapon` varchar(64) NOT NULL DEFAULT '[]',
  157. `secondary_weapon_items` text NOT NULL DEFAULT '[]',
  158. `uniform` varchar(64) NOT NULL DEFAULT '[]',
  159. `uniform_items` text NOT NULL DEFAULT '[]',
  160. `uniform_magazines` text NOT NULL DEFAULT '[]',
  161. `uniform_weapons` text NOT NULL DEFAULT '[]',
  162. `vest` varchar(64) NOT NULL DEFAULT '[]',
  163. `vest_items` text NOT NULL DEFAULT '[]',
  164. `vest_magazines` text NOT NULL DEFAULT '[]',
  165. `vest_weapons` text NOT NULL DEFAULT '[]',
  166. `last_updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
  167. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  168.  
  169. -- --------------------------------------------------------
  170.  
  171. --
  172. -- Table structure for table `player_history`
  173. --
  174.  
  175. CREATE TABLE `player_history` (
  176. `id` int(11) UNSIGNED NOT NULL,
  177. `account_uid` varchar(32) NOT NULL,
  178. `name` varchar(64) NOT NULL,
  179. `died_at` datetime NOT NULL DEFAULT current_timestamp(),
  180. `position_x` double NOT NULL,
  181. `position_y` double NOT NULL,
  182. `position_z` double NOT NULL
  183. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  184.  
  185. -- --------------------------------------------------------
  186.  
  187. --
  188. -- Table structure for table `territory`
  189. --
  190.  
  191. CREATE TABLE `territory` (
  192. `id` int(11) UNSIGNED NOT NULL,
  193. `owner_uid` varchar(32) NOT NULL,
  194. `name` varchar(64) NOT NULL,
  195. `position_x` double NOT NULL,
  196. `position_y` double NOT NULL,
  197. `position_z` double NOT NULL,
  198. `radius` double NOT NULL,
  199. `level` int(11) NOT NULL,
  200. `flag_texture` varchar(255) NOT NULL,
  201. `flag_stolen` tinyint(1) NOT NULL DEFAULT 0,
  202. `flag_stolen_by_uid` varchar(32) DEFAULT NULL,
  203. `flag_stolen_at` datetime DEFAULT NULL,
  204. `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  205. `last_paid_at` datetime DEFAULT current_timestamp(),
  206. `xm8_protectionmoney_notified` tinyint(1) NOT NULL DEFAULT 0,
  207. `build_rights` varchar(640) NOT NULL DEFAULT '0',
  208. `moderators` varchar(320) NOT NULL DEFAULT '0',
  209. `deleted_at` datetime DEFAULT NULL
  210. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  211.  
  212. -- --------------------------------------------------------
  213.  
  214. --
  215. -- Table structure for table `vehicle`
  216. --
  217.  
  218. CREATE TABLE `vehicle` (
  219. `id` int(11) UNSIGNED NOT NULL,
  220. `class` varchar(64) NOT NULL,
  221. `spawned_at` datetime NOT NULL DEFAULT current_timestamp(),
  222. `account_uid` varchar(32) DEFAULT NULL,
  223. `is_locked` tinyint(1) NOT NULL DEFAULT 0,
  224. `fuel` double UNSIGNED NOT NULL DEFAULT 0,
  225. `damage` double UNSIGNED NOT NULL DEFAULT 0,
  226. `hitpoints` text NOT NULL DEFAULT '[]',
  227. `position_x` double NOT NULL DEFAULT 0,
  228. `position_y` double NOT NULL DEFAULT 0,
  229. `position_z` double NOT NULL DEFAULT 0,
  230. `direction_x` double NOT NULL DEFAULT 0,
  231. `direction_y` double NOT NULL DEFAULT 0,
  232. `direction_z` double NOT NULL DEFAULT 0,
  233. `up_x` double NOT NULL DEFAULT 0,
  234. `up_y` double NOT NULL DEFAULT 0,
  235. `up_z` double NOT NULL DEFAULT 1,
  236. `cargo_items` text NOT NULL DEFAULT '[]',
  237. `cargo_magazines` text NOT NULL DEFAULT '[]',
  238. `cargo_weapons` text NOT NULL DEFAULT '[]',
  239. `cargo_container` text NOT NULL DEFAULT '[]',
  240. `last_updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  241. `pin_code` varchar(6) NOT NULL DEFAULT '000000',
  242. `deleted_at` datetime DEFAULT NULL,
  243. `money` int(11) UNSIGNED NOT NULL DEFAULT 0,
  244. `vehicle_texture` text NOT NULL DEFAULT '[]',
  245. `territory_id` int(11) UNSIGNED DEFAULT NULL,
  246. `nickname` varchar(64) NOT NULL DEFAULT 'NULL'
  247. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  248.  
  249. --
  250. -- Indexes for dumped tables
  251. --
  252.  
  253. --
  254. -- Indexes for table `account`
  255. --
  256. ALTER TABLE `account`
  257. ADD PRIMARY KEY (`uid`),
  258. ADD KEY `clan_id` (`clan_id`);
  259.  
  260. --
  261. -- Indexes for table `clan`
  262. --
  263. ALTER TABLE `clan`
  264. ADD PRIMARY KEY (`id`),
  265. ADD KEY `leader_uid` (`leader_uid`);
  266.  
  267. --
  268. -- Indexes for table `clan_map_marker`
  269. --
  270. ALTER TABLE `clan_map_marker`
  271. ADD PRIMARY KEY (`id`),
  272. ADD KEY `clan_id` (`clan_id`);
  273.  
  274. --
  275. -- Indexes for table `construction`
  276. --
  277. ALTER TABLE `construction`
  278. ADD PRIMARY KEY (`id`),
  279. ADD KEY `account_uid` (`account_uid`),
  280. ADD KEY `territory_id` (`territory_id`);
  281.  
  282. --
  283. -- Indexes for table `container`
  284. --
  285. ALTER TABLE `container`
  286. ADD PRIMARY KEY (`id`),
  287. ADD KEY `account_uid` (`account_uid`),
  288. ADD KEY `territory_id` (`territory_id`);
  289.  
  290. --
  291. -- Indexes for table `player`
  292. --
  293. ALTER TABLE `player`
  294. ADD PRIMARY KEY (`id`),
  295. ADD KEY `player_uid` (`account_uid`);
  296.  
  297. --
  298. -- Indexes for table `player_history`
  299. --
  300. ALTER TABLE `player_history`
  301. ADD PRIMARY KEY (`id`);
  302.  
  303. --
  304. -- Indexes for table `territory`
  305. --
  306. ALTER TABLE `territory`
  307. ADD PRIMARY KEY (`id`),
  308. ADD KEY `owner_uid` (`owner_uid`),
  309. ADD KEY `flag_stolen_by_uid` (`flag_stolen_by_uid`);
  310.  
  311. --
  312. -- Indexes for table `vehicle`
  313. --
  314. ALTER TABLE `vehicle`
  315. ADD PRIMARY KEY (`id`),
  316. ADD KEY `account_uid` (`account_uid`),
  317. ADD KEY `vehicle_ibfk_2_idx` (`territory_id`);
  318.  
  319. --
  320. -- AUTO_INCREMENT for dumped tables
  321. --
  322.  
  323. --
  324. -- AUTO_INCREMENT for table `clan`
  325. --
  326. ALTER TABLE `clan`
  327. MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;
  328.  
  329. --
  330. -- AUTO_INCREMENT for table `clan_map_marker`
  331. --
  332. ALTER TABLE `clan_map_marker`
  333. MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;
  334.  
  335. --
  336. -- AUTO_INCREMENT for table `construction`
  337. --
  338. ALTER TABLE `construction`
  339. MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;
  340.  
  341. --
  342. -- AUTO_INCREMENT for table `container`
  343. --
  344. ALTER TABLE `container`
  345. MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;
  346.  
  347. --
  348. -- AUTO_INCREMENT for table `player`
  349. --
  350. ALTER TABLE `player`
  351. MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;
  352.  
  353. --
  354. -- AUTO_INCREMENT for table `player_history`
  355. --
  356. ALTER TABLE `player_history`
  357. MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;
  358.  
  359. --
  360. -- AUTO_INCREMENT for table `territory`
  361. --
  362. ALTER TABLE `territory`
  363. MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;
  364.  
  365. --
  366. -- AUTO_INCREMENT for table `vehicle`
  367. --
  368. ALTER TABLE `vehicle`
  369. MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;
  370.  
  371. --
  372. -- Constraints for dumped tables
  373. --
  374.  
  375. --
  376. -- Constraints for table `account`
  377. --
  378. ALTER TABLE `account`
  379. ADD CONSTRAINT `account_ibfk_1` FOREIGN KEY (`clan_id`) REFERENCES `clan` (`id`) ON DELETE SET NULL;
  380.  
  381. --
  382. -- Constraints for table `clan`
  383. --
  384. ALTER TABLE `clan`
  385. ADD CONSTRAINT `clan_ibfk_1` FOREIGN KEY (`leader_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE;
  386.  
  387. --
  388. -- Constraints for table `clan_map_marker`
  389. --
  390. ALTER TABLE `clan_map_marker`
  391. ADD CONSTRAINT `clan_map_marker_ibfk_1` FOREIGN KEY (`clan_id`) REFERENCES `clan` (`id`) ON DELETE CASCADE;
  392.  
  393. --
  394. -- Constraints for table `construction`
  395. --
  396. ALTER TABLE `construction`
  397. ADD CONSTRAINT `construction_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
  398. ADD CONSTRAINT `construction_ibfk_2` FOREIGN KEY (`territory_id`) REFERENCES `territory` (`id`) ON DELETE CASCADE;
  399.  
  400. --
  401. -- Constraints for table `container`
  402. --
  403. ALTER TABLE `container`
  404. ADD CONSTRAINT `container_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
  405. ADD CONSTRAINT `container_ibfk_2` FOREIGN KEY (`territory_id`) REFERENCES `territory` (`id`) ON DELETE CASCADE;
  406.  
  407. --
  408. -- Constraints for table `player`
  409. --
  410. ALTER TABLE `player`
  411. ADD CONSTRAINT `player_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE;
  412.  
  413. --
  414. -- Constraints for table `territory`
  415. --
  416. ALTER TABLE `territory`
  417. ADD CONSTRAINT `territory_ibfk_1` FOREIGN KEY (`owner_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
  418. ADD CONSTRAINT `territory_ibfk_2` FOREIGN KEY (`flag_stolen_by_uid`) REFERENCES `account` (`uid`) ON DELETE SET NULL;
  419.  
  420. --
  421. -- Constraints for table `vehicle`
  422. --
  423. ALTER TABLE `vehicle`
  424. ADD CONSTRAINT `vehicle_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
  425. ADD CONSTRAINT `vehicle_ibfk_2` FOREIGN KEY (`territory_id`) REFERENCES `territory` (`id`) ON DELETE CASCADE;
  426. COMMIT;
  427.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement