· 9 years ago · Dec 11, 2016, 01:27 PM
1[Err] 1049 - Base 'altislife' inconnue
2[Err] SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
3SET time_zone = "+00:00";
4--
5-- Compatible with newer MySQL versions. (After MySQL-5.5)
6-- This SQL uses utf8mb4 and has CURRENT_TIMESTAMP function.
7--
8
9
10/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
11/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
12/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
13/*!40101 SET NAMES utf8mb4 */;
14
15--
16-- Database: `altislife`
17-- Default Schema
18-- CREATE DATABASE IF NOT EXISTS `altislife` DEFAULT CHARACTER SET utf8mb4;
19--
20USE `altislife`;
21
22--
23-- Drop procedures to ensure no conflicts
24--
25DROP PROCEDURE IF EXISTS `resetLifeVehicles`;
26DROP PROCEDURE IF EXISTS `deleteDeadVehicles`;
27DROP PROCEDURE IF EXISTS `deleteOldHouses`;
28DROP PROCEDURE IF EXISTS `deleteOldGangs`;
29DROP PROCEDURE IF EXISTS `deleteOldContainers`;
30
31--
32-- Procedures
33-- Edit root to match a user in MySQL
34-- For external databases: Edit localhost to match arma3server IP
35--
36
37CREATE DEFINER=`root`@`localhost` PROCEDURE `resetLifeVehicles`()
38BEGIN
39 UPDATE `vehicles` SET `active`= 0;
40END;
41
42CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteDeadVehicles`()
43BEGIN
44 DELETE FROM `vehicles` WHERE `alive` = 0;
45END;
46
47CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldHouses`()
48BEGIN
49 DELETE FROM `houses` WHERE `owned` = 0;
50END;
51
52CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldGangs`()
53BEGIN
54 DELETE FROM `gangs` WHERE `active` = 0;
55END;
56
57CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldContainers`()
58BEGIN
59 DELETE FROM `containers` WHERE `owned` = 0;
60END;
61
62
63-- --------------------------------------------------------
64
65--
66-- Table structure for table `players`
67--
68
69CREATE TABLE IF NOT EXISTS `players` (
70 `uid` int(12) NOT NULL AUTO_INCREMENT,
71 `name` varchar(32) NOT NULL,
72 `aliases` text NOT NULL,
73 `playerid` varchar(64) NOT NULL,
74 `cash` int(100) NOT NULL DEFAULT '0',
75 `bankacc` int(100) NOT NULL DEFAULT '0',
76 `coplevel` enum('0','1','2','3','4','5','6','7') NOT NULL DEFAULT '0',
77 `mediclevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
78 `civ_licenses` text NOT NULL,
79 `cop_licenses` text NOT NULL,
80 `med_licenses` text NOT NULL,
81 `civ_gear` text NOT NULL,
82 `cop_gear` text NOT NULL,
83 `med_gear` text NOT NULL,
84 `civ_stats` varchar(32) NOT NULL DEFAULT '"[100,100,0]"',
85 `cop_stats` varchar(32) NOT NULL DEFAULT '"[100,100,0]"',
86 `med_stats` varchar(32) NOT NULL DEFAULT '"[100,100,0]"',
87 `arrested` tinyint(1) NOT NULL DEFAULT '0',
88 `adminlevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
89 `donorlevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
90 `blacklist` tinyint(1) NOT NULL DEFAULT '0',
91 `civ_alive` tinyint(1) NOT NULL DEFAULT '0',
92 `civ_position` varchar(64) NOT NULL DEFAULT '"[]"',
93 `playtime` varchar(32) NOT NULL DEFAULT '"[0,0,0]"',
94 `insert_time` timestamp DEFAULT CURRENT_TIMESTAMP,
95 `last_seen` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
96 PRIMARY KEY (`uid`),
97 UNIQUE KEY `playerid` (`playerid`),
98 KEY `name` (`name`),
99 KEY `blacklist` (`blacklist`)
100) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=12 ;
101
102-- --------------------------------------------------------
103
104--
105-- Table structure for table `vehicles`
106--
107
108CREATE TABLE IF NOT EXISTS `vehicles` (
109 `id` int(12) NOT NULL AUTO_INCREMENT,
110 `side` varchar(16) NOT NULL,
111 `classname` varchar(64) NOT NULL,
112 `type` varchar(16) NOT NULL,
113 `pid` varchar(32) NOT NULL,
114 `alive` tinyint(1) NOT NULL DEFAULT '1',
115 `blacklist` tinyint(1) NOT NULL DEFAULT '0',
116 `active` tinyint(1) NOT NULL DEFAULT '0',
117 `plate` int(20) NOT NULL,
118 `color` int(20) NOT NULL,
119 `inventory` text NOT NULL,
120 `gear` text NOT NULL,
121 `fuel` double NOT NULL DEFAULT '1',
122 `damage` varchar(256) NOT NULL,
123 `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
124 PRIMARY KEY (`id`),
125 KEY `side` (`side`),
126 KEY `pid` (`pid`),
127 KEY `type` (`type`)
128) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=2 ;
129
130-- --------------------------------------------------------
131
132--
133-- Table structure for table `houses`
134-- Needed fo
135[Msg] Finished - Unsuccessfully
136--------------------------------------------------