-
Notifications
You must be signed in to change notification settings - Fork 22
/
sql.sql
49 lines (40 loc) · 1.5 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
CREATE TABLE `owned_vehicles` (
`amigos` longtext DEFAULT NULL,
`owner` varchar(46) DEFAULT NULL,
`plate` varchar(12) NOT NULL,
`vehicle` longtext DEFAULT NULL,
`type` varchar(20) NOT NULL DEFAULT 'car',
`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,
`glovebox` longtext DEFAULT NULL,
`trunk` longtext DEFAULT NULL,
`carseller` int(11) DEFAULT 0,
`calle` varchar(46) DEFAULT NULL,
`infoimpound` longtext DEFAULT NULL,
`lastparking` longtext DEFAULT NULL,
`lastposition` longtext DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
ALTER TABLE `owned_vehicles`
ADD PRIMARY KEY (`plate`),
ADD KEY `amigos` (`amigos`(1024)),
ADD KEY `amigos_2` (`amigos`(1024));
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-- Update last version
ALTER TABLE `owned_vehicles`
DROP COLUMN `calle`,
DROP COLUMN `infoimpound`,
DROP COLUMN `lastparking`,
DROP COLUMN `lastposition`,
DROP COLUMN `amigos`;
ALTER TABLE `owned_vehicles`
ADD COLUMN `calle` varchar(46) DEFAULT NULL,
ADD COLUMN `infoimpound` longtext DEFAULT NULL,
ADD COLUMN `lastparking` longtext DEFAULT NULL,
ADD COLUMN `lastposition` longtext DEFAULT NULL,
ADD COLUMN `amigos` longtext DEFAULT NULL;