This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathsql.sql
49 lines (44 loc) · 1.78 KB
/
sql.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
CREATE TABLE IF NOT EXISTS `oilrig_position` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`citizenid` varchar(50) DEFAULT NULL,
`name` varchar(50) DEFAULT NULL,
`oilrig_hash` varchar(50) DEFAULT NULL,
`position` TEXT NOT NULL DEFAULT '0',
`metadata` TEXT NOT NULL DEFAULT '0',
`state` BOOLEAN NOT NULL DEFAULT FALSE,
`deleted` BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `oilrig_storage` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`citizenid` varchar(50) DEFAULT NULL,
`name` varchar(50) DEFAULT NULL,
`metadata` TEXT NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `oilrig_cdu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`citizenid` varchar(50) DEFAULT NULL,
`metadata` TEXT NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `oilrig_blender` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`citizenid` varchar(50) DEFAULT NULL,
`metadata` TEXT NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
-- Patch 1.1.0 new part
CREATE TABLE IF NOT EXISTS `oilcompany_employees` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`citizenid` varchar(50) DEFAULT NULL,
`oilrig_hash` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
-- for pre exsting users to update their database don't use it on a fresh install
-- ALTER TABLE `oilrig_position` ADD `deleted` BOOLEAN NOT NULL DEFAULT FALSE;