-
Notifications
You must be signed in to change notification settings - Fork 0
/
openroom.sql
260 lines (195 loc) · 6.95 KB
/
openroom.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Table structure for table `administrators`
--
CREATE TABLE IF NOT EXISTS `administrators` (
`username` varchar(255) NOT NULL,
PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `bannedusers`
--
CREATE TABLE IF NOT EXISTS `bannedusers` (
`username` varchar(255) NOT NULL,
PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `cancelled`
--
CREATE TABLE IF NOT EXISTS `cancelled` (
`reservationid` bigint(20) NOT NULL,
`start` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`end` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`roomid` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
`timeofrequest` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`timeofcancel` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`reservationid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `deletedrooms`
--
CREATE TABLE IF NOT EXISTS `deletedrooms` (
`roomid` int(11) NOT NULL,
`roomname` varchar(255) NOT NULL,
`roomcapacity` int(11) NOT NULL,
`roomgroupid` bigint(20) NOT NULL,
`roomdescription` longtext NOT NULL,
PRIMARY KEY (`roomid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `optionalfields`
--
CREATE TABLE IF NOT EXISTS `optionalfields` (
`optionname` varchar(255) NOT NULL,
`optionformname` varchar(255) NOT NULL COMMENT 'no spaces, a-z only',
`optiontype` int(11) NOT NULL COMMENT '0 = text, 1 = select',
`optionchoices` varchar(700) NOT NULL COMMENT '";" delimited',
`optionorder` int(11) NOT NULL,
`optionquestion` varchar(255) NOT NULL,
`optionprivate` tinyint(1) NOT NULL DEFAULT '0',
`optionrequired` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`optionname`),
UNIQUE KEY `optionformname` (`optionformname`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `reporters`
--
CREATE TABLE IF NOT EXISTS `reporters` (
`username` varchar(255) NOT NULL,
PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `reservationoptions`
--
CREATE TABLE IF NOT EXISTS `reservationoptions` (
`optionname` varchar(255) NOT NULL,
`reservationid` bigint(20) NOT NULL,
`optionvalue` varchar(700) NOT NULL,
PRIMARY KEY (`optionname`,`reservationid`),
KEY `reservationid` (`reservationid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `reservations`
--
CREATE TABLE IF NOT EXISTS `reservations` (
`reservationid` bigint(20) NOT NULL AUTO_INCREMENT,
`start` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`end` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`roomid` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
`numberingroup` int(11) NOT NULL,
`timeofrequest` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`reservationid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=90 ;
-- --------------------------------------------------------
--
-- Table structure for table `roomgroups`
--
CREATE TABLE IF NOT EXISTS `roomgroups` (
`roomgroupid` bigint(20) NOT NULL AUTO_INCREMENT,
`roomgroupname` varchar(255) NOT NULL,
PRIMARY KEY (`roomgroupid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
-- --------------------------------------------------------
--
-- Table structure for table `roomhours`
--
CREATE TABLE IF NOT EXISTS `roomhours` (
`roomhoursid` bigint(20) NOT NULL AUTO_INCREMENT,
`roomid` int(11) NOT NULL,
`dayofweek` smallint(6) NOT NULL,
`start` time NOT NULL,
`end` time NOT NULL,
PRIMARY KEY (`roomhoursid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=298 ;
-- --------------------------------------------------------
--
-- Table structure for table `rooms`
--
CREATE TABLE IF NOT EXISTS `rooms` (
`roomid` int(11) NOT NULL AUTO_INCREMENT,
`roomname` varchar(255) NOT NULL,
`roomposition` int(11) NOT NULL,
`roomcapacity` int(11) NOT NULL,
`roomgroupid` bigint(20) NOT NULL,
`roomdescription` longtext NOT NULL,
PRIMARY KEY (`roomid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=28 ;
-- --------------------------------------------------------
--
-- Table structure for table `roomspecialhours`
--
CREATE TABLE IF NOT EXISTS `roomspecialhours` (
`roomspecialhoursid` bigint(20) NOT NULL AUTO_INCREMENT,
`roomid` int(11) NOT NULL,
`fromrange` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`torange` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`start` time NOT NULL,
`end` time NOT NULL,
PRIMARY KEY (`roomspecialhoursid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `settings`
--
CREATE TABLE IF NOT EXISTS `settings` (
`settingname` varchar(255) NOT NULL,
`settingvalue` longtext NOT NULL,
PRIMARY KEY (`settingname`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `settings`
--
INSERT INTO `settings` (`settingname`, `settingvalue`) VALUES
('allow_past_reservations', 'false'),
('allow_simultaneous_reservations', 'false'),
('email_can_gef', 'a:1:{i:0;s:0:"";}'),
('email_can_terse', 'a:1:{i:0;s:0:"";}'),
('email_can_verbose', 'a:1:{i:0;s:0:"";}'),
('email_condition', ''),
('email_condition_value', ''),
('email_cond_gef', 'a:1:{i:0;s:0:"";}'),
('email_cond_terse', 'a:1:{i:0;s:0:"";}'),
('email_cond_verbose', 'a:1:{i:0;s:0:"";}'),
('email_filter', 'a:1:{i:0;s:0:"";}'),
('email_res_gef', 'a:1:{i:0;s:0:"";}'),
('email_res_terse', 'a:1:{i:0;s:0:"";}'),
('email_res_verbose', 'a:1:{i:0;s:0:"";}'),
('email_system', ''),
('https', 'true'),
('instance_name', 'OpenRoom'),
('instance_url', ''),
('interval', '30'),
('ldap_baseDN', ''),
('ldap_host', ''),
('limit_duration', '240'),
('limit_frequency', 'a:2:{i:0;s:1:"0";i:1;s:3:"day";}'),
('limit_openingday', ''),
('limit_total', 'a:2:{i:0;s:3:"240";i:1;s:3:"day";}'),
('limit_window', 'a:2:{i:0;i:0;i:1;s:8:"7/1/2010";}'),
('login_method', 'normal'),
('policies', ''),
('remindermessage', ''),
('systemid', '0000000001'),
('theme', 'default'),
('time_format', 'g:i a');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`lastlogin` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`active` varchar(255) NOT NULL DEFAULT '0',
PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;