-
Notifications
You must be signed in to change notification settings - Fork 2
/
schema.sql
46 lines (43 loc) · 1.5 KB
/
schema.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
SET time_zone = "+00:00";
CREATE TABLE IF NOT EXISTS `calendar`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(256) NOT NULL,
`description` text,
`color` varchar(7) NOT NULL COMMENT 'Like #ffffff',
PRIMARY KEY (`id`),
UNIQUE KEY `calendar_id_uindex` (`id`)
) ENGINE = MyISAM
DEFAULT CHARSET = latin1
AUTO_INCREMENT = 11;
CREATE TABLE IF NOT EXISTS `event`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`startDate` date NOT NULL,
`endDate` date NOT NULL,
`defaultStartTime` time NOT NULL,
`defaultEndTime` time NOT NULL,
`daysOfWeek` varchar(7) NOT NULL,
`defaultColor` varchar(7) NOT NULL,
`calendarId` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `event_id_uindex` (`id`),
KEY `calendarId` (`calendarId`)
) ENGINE = MyISAM
DEFAULT CHARSET = latin1
AUTO_INCREMENT = 20;
CREATE TABLE IF NOT EXISTS `eventOccurrence`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(256) NOT NULL,
`description` text,
`startDateTime` datetime NOT NULL,
`endDateTime` datetime NOT NULL,
`color` varchar(7) NOT NULL,
`eventId` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `eventOccurrence_id_uindex` (`id`),
KEY `eventId` (`eventId`)
) ENGINE = MyISAM
DEFAULT CHARSET = latin1 COMMENT ='A single occurrence of a repeated event'
AUTO_INCREMENT = 129;