From 7b9a2ff2e30e127f82040fc56ea1561cbc8b87e5 Mon Sep 17 00:00:00 2001
From: Simon Rettberg
Date: Wed, 7 May 2014 17:12:39 +0200
Subject: Add DB classes + dummy DbImage class

---
 extras/offenburg-scheme.sql | 365 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 365 insertions(+)
 create mode 100644 extras/offenburg-scheme.sql

(limited to 'extras/offenburg-scheme.sql')

diff --git a/extras/offenburg-scheme.sql b/extras/offenburg-scheme.sql
new file mode 100644
index 0000000..16745e5
--- /dev/null
+++ b/extras/offenburg-scheme.sql
@@ -0,0 +1,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
+
-- 
cgit v1.2.3-55-g7522

