changeset 3:7ffaefcee5b5

Adding database schema.
author "jurzua <jurzua@mpiwg-berlin.mpg.de>"
date Tue, 12 May 2015 14:54:13 +0200
parents 57d19e93f1c3
children c30ff4f27ec3
files database/LGServices_Schema.sql src/main/resources/config.properties src/main/resources/hibernate.cfg.xml
diffstat 3 files changed, 120 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/database/LGServices_Schema.sql	Tue May 12 14:54:13 2015 +0200
@@ -0,0 +1,115 @@
+-- MySQL dump 10.13  Distrib 5.5.43, for debian-linux-gnu (x86_64)
+--
+-- Host: localhost    Database: LGServices
+-- ------------------------------------------------------
+-- Server version	5.5.43-0ubuntu0.14.04.1
+
+/*!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 `Branch`
+--
+
+DROP TABLE IF EXISTS `Branch`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `Branch` (
+  `id` bigint(20) NOT NULL,
+  `creationDate` datetime DEFAULT NULL,
+  `lastChangeDate` datetime DEFAULT NULL,
+  `bookId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+  `bookName` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
+  `contributors` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+  `currentLastFileId` bigint(20) DEFAULT NULL,
+  `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+  `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+  `sectionId` bigint(20) DEFAULT NULL,
+  `sectionName` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
+  `userId` bigint(20) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `File`
+--
+
+DROP TABLE IF EXISTS `File`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `File` (
+  `id` bigint(20) NOT NULL,
+  `creationDate` datetime DEFAULT NULL,
+  `lastChangeDate` datetime DEFAULT NULL,
+  `branchId` bigint(20) DEFAULT NULL,
+  `dvId` bigint(20) DEFAULT NULL,
+  `fileName` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+  `lastVersion` bit(1) DEFAULT NULL,
+  `notes` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+  `userId` bigint(20) DEFAULT NULL,
+  `version` int(11) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `hibernate_sequences`
+--
+
+DROP TABLE IF EXISTS `hibernate_sequences`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `hibernate_sequences` (
+  `sequence_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+  `sequence_next_hi_value` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `row_sequence`
+--
+
+DROP TABLE IF EXISTS `row_sequence`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `row_sequence` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `last_value` bigint(20) DEFAULT NULL,
+  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `test`
+--
+
+DROP TABLE IF EXISTS `test`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `test` (
+  `test_id` int(11) NOT NULL AUTO_INCREMENT,
+  `name` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`test_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COMMENT='latin1_swedish_ci';
+/*!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 2015-05-12 14:53:23
--- a/src/main/resources/config.properties	Fri May 08 16:36:25 2015 +0200
+++ b/src/main/resources/config.properties	Tue May 12 14:54:13 2015 +0200
@@ -4,8 +4,8 @@
 files_root=/gazetteer-server/data
 
 #Local
-#dvn_server=http://localhost/dvn
-#root_server=http://localhost:8080/LGServices
+dvn_server=http://localhost/dvn
+root_server=http://localhost:8080/LGServices
 
 #localgazetteers-dev
 #dvn_server=http://localgazetteers-dev/dvn
@@ -15,7 +15,7 @@
 
 
 #localgazetteers
-dvn_server=http://localgazetteers/dvn
-root_server=http://localgazetteers/LGServices
+#dvn_server=http://localgazetteers/dvn
+#root_server=http://localgazetteers/LGServices
 toc_interface=http://localgazetteers/LGToc
 extraction_interface=http://localgazetteers/extraction-interface
\ No newline at end of file
--- a/src/main/resources/hibernate.cfg.xml	Fri May 08 16:36:25 2015 +0200
+++ b/src/main/resources/hibernate.cfg.xml	Tue May 12 14:54:13 2015 +0200
@@ -14,7 +14,7 @@
 		<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
 		 -->
 		<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
-        <property name="hibernate.connection.url">jdbc:mysql://localhost/LGServer?characterEncoding=UTF-8</property>
+        <property name="hibernate.connection.url">jdbc:mysql://localhost/LGServices?characterEncoding=UTF-8</property>
         
         <property name="hibernate.connection.username">root</property>
 		<property name="hibernate.connection.password">admin</property>