-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmariadb-structure.sql
143 lines (117 loc) · 4.94 KB
/
mariadb-structure.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 21, 2024 at 01:10 AM
-- Server version: 11.3.2-MariaDB
-- PHP Version: 8.2.24
START TRANSACTION;
SET time_zone = "+00:00";
--
-- Database: `personal_location_history`
--
-- --------------------------------------------------------
--
-- Table structure for table `activity`
--
CREATE TABLE IF NOT EXISTS `activity` (
`activity_id` bigint(20) NOT NULL AUTO_INCREMENT,
`segment_id` bigint(20) NOT NULL COMMENT 'refer to semanticsegments.id',
`start_latLng` varchar(100) DEFAULT NULL,
`end_latLng` varchar(100) DEFAULT NULL,
`distanceMeters` decimal(30,20) DEFAULT NULL,
`probability` decimal(30,20) DEFAULT NULL,
`topCandidate_type` varchar(100) DEFAULT NULL,
`topCandidate_probability` decimal(30,20) DEFAULT NULL,
`parking_location_latLng` varchar(100) DEFAULT NULL,
`parking_startTime` datetime DEFAULT NULL COMMENT 'based on Google maps timeline exported date/time (local date/time)',
PRIMARY KEY (`activity_id`),
KEY `segment_id` (`segment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `google_places`
--
CREATE TABLE IF NOT EXISTS `google_places` (
`place_id` varchar(255) NOT NULL,
`place_name` varchar(255) DEFAULT NULL,
`last_update` datetime NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`place_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `phinxlog`
--
CREATE TABLE IF NOT EXISTS `phinxlog` (
`version` bigint(20) NOT NULL,
`migration_name` varchar(100) DEFAULT NULL,
`start_time` timestamp NULL DEFAULT NULL,
`end_time` timestamp NULL DEFAULT NULL,
`breakpoint` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `semanticsegments`
--
CREATE TABLE IF NOT EXISTS `semanticsegments` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`startTime` datetime DEFAULT NULL COMMENT 'based on Google maps timeline exported date/time (local date/time)',
`endTime` datetime DEFAULT NULL COMMENT 'based on Google maps timeline exported date/time (local date/time)',
`startTimeTimezoneUtcOffsetMinutes` int(11) DEFAULT NULL,
`endTimeTimezoneUtcOffsetMinutes` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Google maps timeline exported main object.';
-- --------------------------------------------------------
--
-- Table structure for table `timelinememory`
--
CREATE TABLE IF NOT EXISTS `timelinememory` (
`tmem_id` bigint(20) NOT NULL AUTO_INCREMENT,
`segment_id` bigint(20) NOT NULL COMMENT 'refer to semanticsegments.id',
`trip_distanceFromOriginKms` int(10) DEFAULT NULL,
PRIMARY KEY (`tmem_id`),
KEY `segment_id` (`segment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `timelinememory_trip_destinations`
--
CREATE TABLE IF NOT EXISTS `timelinememory_trip_destinations` (
`tmem_trip_dest_id` bigint(20) NOT NULL AUTO_INCREMENT,
`tmem_id` bigint(20) NOT NULL COMMENT 'refer to timelinememory.tmem_id',
`identifier_placeId` varchar(100) DEFAULT NULL,
PRIMARY KEY (`tmem_trip_dest_id`),
KEY `tmem_id` (`tmem_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `timelinepath`
--
CREATE TABLE IF NOT EXISTS `timelinepath` (
`tlp_id` bigint(20) NOT NULL AUTO_INCREMENT,
`segment_id` bigint(20) NOT NULL COMMENT 'refer to semanticsegments.id',
`point` varchar(100) DEFAULT NULL,
`time` datetime DEFAULT NULL COMMENT 'based on Google maps timeline exported date/time (local date/time)',
PRIMARY KEY (`tlp_id`),
KEY `segment_id` (`segment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Relationship one(segment) to many(paths).';
-- --------------------------------------------------------
--
-- Table structure for table `visit`
--
CREATE TABLE IF NOT EXISTS `visit` (
`visit_id` bigint(20) NOT NULL AUTO_INCREMENT,
`segment_id` bigint(20) NOT NULL COMMENT 'refer to semanticsegments.id',
`hierarchyLevel` int(5) DEFAULT NULL,
`probability` decimal(30,20) DEFAULT NULL,
`topCandidate_placeId` varchar(100) DEFAULT NULL,
`topCandidate_semanticType` varchar(100) DEFAULT NULL,
`topCandidate_probability` decimal(30,20) DEFAULT NULL,
`topCandidate_placeLocation_latLng` varchar(100) DEFAULT NULL,
`isTimelessVisit` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`visit_id`),
KEY `segment_id` (`segment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
COMMIT;