forked from Mono-94/mVehicle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsql.sql
More file actions
44 lines (34 loc) · 1.24 KB
/
sql.sql
File metadata and controls
44 lines (34 loc) · 1.24 KB
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
--- esx
CREATE TABLE `owned_vehicles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner` varchar(46) DEFAULT NULL,
`plate` varchar(12) NOT NULL,
`vehicle` longtext DEFAULT NULL,
`type` varchar(20) NOT NULL DEFAULT 'automobile',
`job` varchar(20) DEFAULT NULL,
`stored` tinyint(4) NOT NULL DEFAULT 0,
`parking` varchar(60) DEFAULT NULL,
`pound` varchar(60) DEFAULT NULL,
`mileage` int(11) DEFAULT 0,
`metadata` JSON DEFAULT '{"keys":{}}',
`glovebox` JSON DEFAULT NULL,
`trunk` JSON DEFAULT NULL,
`carseller` int(11) DEFAULT 0,
`private` tinyint(1) DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_plate` (`plate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
-- uptade `metadata` in `owned_vehicles`
ALTER TABLE `owned_vehicles`
ALTER COLUMN `metadata` SET DEFAULT '{"keys":{}}';
--- qbox
ALTER TABLE `player_vehicles`
ADD COLUMN `mileage` INT(11) DEFAULT 0,
ADD COLUMN `metadata` JSON DEFAULT '{"keys":{}}',
ADD COLUMN `pound` VARCHAR(60) DEFAULT NULL,
ADD COLUMN `stored` TINYINT(4) DEFAULT 0,
ADD COLUMN `type` varchar(20) DEFAULT 'automobile',
ADD COLUMN `job` varchar(20) DEFAULT NULL;
-- uptade `metadata` in `player_vehicles`
ALTER TABLE `player_vehicles`
ALTER COLUMN `metadata` SET DEFAULT '{"keys":{}}';