-
Notifications
You must be signed in to change notification settings - Fork 0
/
erulet_dbscript.sql
90 lines (83 loc) · 1.7 KB
/
erulet_dbscript.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
DROP TABLE `route`
DROP TABLE `track`
DROP TABLE `step`
DROP TABLE `highlight`
DROP TABLE `reference`
DROP TABLE `interactiveimage`
DROP TABLE `box`
CREATE TABLE `track`
(
`id` VARCHAR ,
`name` VARCHAR ,
PRIMARY KEY (`id`)
)
CREATE TABLE `route`
(
`description` VARCHAR ,
`userId` VARCHAR ,
`id` VARCHAR ,
`idRouteBasedOn` VARCHAR ,
`intImgId` VARCHAR , --> Reference to interactive image
`localCarto` VARCHAR ,
`name` VARCHAR ,
`referenceId` VARCHAR ,
`trackId` VARCHAR ,
`upLoaded` SMALLINT ,
`globalRating` INTEGER , --> Ratings
`userRating` INTEGER ,
PRIMARY KEY (`id`)
)
CREATE TABLE `step`
(
`absoluteTime` VARCHAR ,
`trackId` VARCHAR ,
`routeId` VARCHAR , --> For shared steps only
`hlId` VARCHAR ,
`id` VARCHAR ,
`referenceId` VARCHAR ,
`order` INTEGER ,
`longitude` DOUBLE PRECISION ,
`precision` DOUBLE PRECISION ,
`latitude` DOUBLE PRECISION ,
`altitude` DOUBLE PRECISION ,
`absoluteTimeMillis` BIGINT ,
PRIMARY KEY (`id`)
)
CREATE TABLE `highlight`
(
`name` VARCHAR ,
`id` VARCHAR ,
`longText` VARCHAR ,
`mediaPath` VARCHAR ,
`radius` DOUBLE PRECISION ,
`globalRating` INTEGER , --> Ratings
`userRating` INTEGER ,
`type` INTEGER ,
PRIMARY KEY (`id`)
)
CREATE TABLE `reference`
(
`id` VARCHAR ,
`name` VARCHAR ,
`textContent` VARCHAR ,
PRIMARY KEY (`id`)
)
CREATE TABLE `interactiveimage`
(
`id` VARCHAR ,
`mediaPath` VARCHAR ,
`originalHeight` INTEGER ,
`originalWidth` INTEGER ,
PRIMARY KEY (`id`)
)
CREATE TABLE `box`
(
`id` VARCHAR ,
`interactiveImageId` VARCHAR ,
`message` VARCHAR ,
`maxY` INTEGER ,
`maxX` INTEGER ,
`minX` INTEGER ,
`minY` INTEGER ,
PRIMARY KEY (`id`)
)