summaryrefslogtreecommitdiffstats
path: root/extras/offenburg-scheme.sql
blob: 16745e55fd3e07aa554239d64dbc11a3521b879b (plain) (blame)
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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
-- MySQL dump 10.13  Distrib 5.5.35, for debian-linux-gnu (i686)
--
-- Host: localhost    Database: bwLehrpool
-- ------------------------------------------------------
-- Server version	5.5.35-0+wheezy1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `FtpUsers`
--

DROP TABLE IF EXISTS `FtpUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FtpUsers` (
  `User` varchar(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `Password` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `Uid` int(11) NOT NULL DEFAULT '-1',
  `Gid` int(11) NOT NULL DEFAULT '-1',
  `Dir` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `CreationDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`User`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `m_VLData_imageContent`
--

DROP TABLE IF EXISTS `m_VLData_imageContent`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `m_VLData_imageContent` (
  `imageID` int(11) NOT NULL,
  `imageVersion` int(11) NOT NULL,
  `SW_ID` int(11) NOT NULL,
  `LicenseType` int(11) NOT NULL COMMENT 'free | testVersion | Key | ownLicenseKey | licenseServer | onlyOne',
  `licenseServerAdress` varchar(100) DEFAULT NULL,
  `comment` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`imageID`,`imageVersion`,`SW_ID`),
  KEY `imageID_idx` (`imageID`),
  KEY `imageVersion_idx` (`imageVersion`),
  KEY `SW_ID_idx` (`SW_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `m_VLData_imageInfo`
--

DROP TABLE IF EXISTS `m_VLData_imageInfo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `m_VLData_imageInfo` (
  `GUID_imageID` varchar(45) NOT NULL,
  `imageVersion` int(11) NOT NULL,
  `image_name` varchar(45) DEFAULT NULL,
  `image_path` varchar(255) DEFAULT NULL,
  `image_lastCall` datetime DEFAULT NULL,
  `image_create_time` datetime DEFAULT NULL,
  `image_update_time` datetime DEFAULT NULL,
  `image_owner` varchar(45) DEFAULT NULL,
  `image_change_by` varchar(45) DEFAULT NULL,
  `rec_create_time` datetime DEFAULT NULL,
  `rec_change_time` datetime DEFAULT NULL,
  `rec_owner` varchar(45) DEFAULT NULL,
  `rec_change_by` varchar(45) DEFAULT NULL,
  `content_operatingSystem` int(11) DEFAULT NULL,
  `status_isCompressed` tinyint(1) DEFAULT '0',
  `status_isSecure` tinyint(1) DEFAULT '0',
  `status_isOptimzed` tinyint(1) DEFAULT '0',
  `status_isValid` tinyint(1) DEFAULT '0',
  `status_isReady` tinyint(1) DEFAULT '0',
  `status_isDeleted` tinyint(1) DEFAULT NULL,
  `status_isLastOfficialVersion` tinyint(1) DEFAULT NULL COMMENT 'wird verwendet, wenn z.B. eine Lecturezeit verändert werden soll, so dass dies nur möglich ist, wenn die Lecture auch die aktuelle Version verwendet. Wenn auf eine ImageVersion keine aktive Lecture mehr verweist, kann diese gelöscht werden.',
  `cond_hasLicenseRestriction` tinyint(1) DEFAULT '0' COMMENT 'mehrere Kategorien: 1: free; 2: UserOwnLicense; 3: licenseServer; 4: restricted; wobei als Wert immer die höherwertigste der Programmpakete genommen wird',
  `cond_hasInternetRestriction` tinyint(1) DEFAULT '0',
  `cond_minRAM` int(11) DEFAULT NULL,
  `cond_minCPUs` int(11) DEFAULT NULL,
  `image_isTemplate` varchar(45) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT 'FALSE' COMMENT 'Flag zum setzen, ob ein Image als Vorlage behandelt werden soll oder als bestehendes Labor',
  PRIMARY KEY (`GUID_imageID`,`imageVersion`),
  KEY `userID_idx` (`image_owner`,`image_change_by`,`rec_owner`,`rec_change_by`),
  KEY `operatingSystemID_idx` (`content_operatingSystem`),
  KEY `GUID_imageID_idx` (`GUID_imageID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `m_VLData_lecture`
--

DROP TABLE IF EXISTS `m_VLData_lecture`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `m_VLData_lecture` (
  `lectureID` varchar(45) NOT NULL,
  `name` varchar(45) DEFAULT NULL,
  `isActive` tinyint(1) DEFAULT NULL,
  `startTime` datetime DEFAULT NULL,
  `endTime` datetime DEFAULT NULL,
  `lastUsed` datetime DEFAULT NULL,
  `shortDescription` varchar(50) DEFAULT NULL,
  `description` varchar(500) DEFAULT NULL,
  `imageID` varchar(45) DEFAULT NULL,
  `imageVersion` int(11) DEFAULT NULL,
  `admin_createTime` datetime DEFAULT NULL,
  `admin_changeTime` datetime DEFAULT NULL,
  `admin_owner` varchar(45) DEFAULT NULL,
  `admin_change_by` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`lectureID`),
  KEY `imageID_idx` (`imageID`),
  KEY `userID_idx` (`admin_owner`,`admin_change_by`),
  KEY `imageVersion_idx` (`imageVersion`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `m_applicationsoftware`
--

DROP TABLE IF EXISTS `m_applicationsoftware`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `m_applicationsoftware` (
  `SoftwarePackageID` int(11) NOT NULL,
  `name` varchar(45) DEFAULT NULL,
  `architecture` int(11) DEFAULT NULL COMMENT 'Angaben in Bit\n32 | 64',
  `supplier` int(11) DEFAULT NULL,
  PRIMARY KEY (`SoftwarePackageID`),
  KEY `supplierID_idx` (`supplier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `m_group`
--

DROP TABLE IF EXISTS `m_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `m_group` (
  `groupID` int(11) NOT NULL,
  `name` varchar(45) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`groupID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `m_image`
--

DROP TABLE IF EXISTS `m_image`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `m_image` (
  `GUID_imageID` int(11) NOT NULL,
  PRIMARY KEY (`GUID_imageID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `m_institution`
--

DROP TABLE IF EXISTS `m_institution`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `m_institution` (
  `institutionID` varchar(50) NOT NULL,
  `name` varchar(80) DEFAULT NULL,
  PRIMARY KEY (`institutionID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `m_operatingSystem`
--

DROP TABLE IF EXISTS `m_operatingSystem`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `m_operatingSystem` (
  `operatingSystemID` int(11) NOT NULL,
  `name` varchar(45) DEFAULT NULL,
  `architecture` int(11) DEFAULT NULL COMMENT 'Angaben in Bit\n32 | 64',
  `supplier` int(11) DEFAULT NULL,
  PRIMARY KEY (`operatingSystemID`),
  KEY `supplierID_idx` (`supplier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `m_role`
--

DROP TABLE IF EXISTS `m_role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `m_role` (
  `roleID` int(11) NOT NULL,
  `name` varchar(45) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`roleID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `m_supplier`
--

DROP TABLE IF EXISTS `m_supplier`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `m_supplier` (
  `supplierID` int(11) NOT NULL,
  `name` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`supplierID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `m_user`
--

DROP TABLE IF EXISTS `m_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `m_user` (
  `userID` varchar(45) NOT NULL,
  `loginName` varchar(45) DEFAULT NULL,
  `Nachname` varchar(45) DEFAULT NULL,
  `Vorname` varchar(45) DEFAULT NULL,
  `mail` varchar(45) DEFAULT NULL,
  `lastLogin` datetime DEFAULT NULL,
  `institution` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`userID`),
  KEY `institutionID_idx` (`institution`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pm_VLData_image`
--

DROP TABLE IF EXISTS `pm_VLData_image`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pm_VLData_image` (
  `GUID` bigint(20) NOT NULL COMMENT 'GUID Typ',
  `GUID_imageID` int(11) DEFAULT NULL,
  `roleID` int(11) DEFAULT NULL,
  `userID` int(11) DEFAULT NULL,
  `groupID` int(11) DEFAULT NULL COMMENT 'es gibt eine Gruppe ALL',
  `image_read` tinyint(1) DEFAULT NULL,
  `image_write` tinyint(1) DEFAULT NULL,
  `image_admin` tinyint(1) DEFAULT NULL,
  `image_changePermission` tinyint(1) DEFAULT NULL,
  `info_read` tinyint(1) DEFAULT NULL,
  `info_write` tinyint(1) DEFAULT NULL,
  `info_admin` tinyint(1) DEFAULT NULL,
  `info_changePermission` tinyint(1) DEFAULT NULL,
  `link_allowed` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`GUID`),
  KEY `GUID_imageID_idx` (`GUID_imageID`),
  KEY `userID_idx` (`userID`),
  KEY `roleID_idx` (`roleID`),
  KEY `groupID_idx` (`groupID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pm_VLData_lecture`
--

DROP TABLE IF EXISTS `pm_VLData_lecture`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pm_VLData_lecture` (
  `GUID` bigint(20) NOT NULL COMMENT 'GUID Typ',
  `lectureID` int(11) DEFAULT NULL,
  `roleID` int(11) DEFAULT NULL,
  `userID` int(11) DEFAULT NULL,
  `groupID` int(11) DEFAULT NULL COMMENT 'es gibt eine Gruppe ALL',
  `rec_read` tinyint(1) DEFAULT NULL,
  `rec_write` tinyint(1) DEFAULT NULL,
  `rec_admin` tinyint(1) DEFAULT NULL,
  `rec_changePermission` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`GUID`),
  KEY `lectureID_idx` (`lectureID`),
  KEY `roleID_idx` (`roleID`),
  KEY `userID_idx` (`userID`),
  KEY `groupID_idx` (`groupID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pm_group_role`
--

DROP TABLE IF EXISTS `pm_group_role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pm_group_role` (
  `groupID` int(11) NOT NULL,
  `roleID` int(11) NOT NULL,
  PRIMARY KEY (`groupID`,`roleID`),
  KEY `groupID_idx` (`groupID`),
  KEY `roleID_idx` (`roleID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pm_user_group`
--

DROP TABLE IF EXISTS `pm_user_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pm_user_group` (
  `userID` int(11) NOT NULL,
  `groupID` int(11) NOT NULL,
  PRIMARY KEY (`userID`,`groupID`),
  KEY `userID_idx` (`userID`),
  KEY `groupID_idx` (`groupID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pm_user_role`
--

DROP TABLE IF EXISTS `pm_user_role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pm_user_role` (
  `userID` int(11) NOT NULL,
  `roleID` int(11) NOT NULL,
  PRIMARY KEY (`userID`,`roleID`),
  KEY `userID_idx` (`userID`),
  KEY `roleID_idx` (`roleID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2014-05-07 15:46:24