From 431e6c0895af731a6096e9811d0d3540a3b1579e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sven=20K=C3=A4stle?= <sven.kaestle@gmx.de>
Date: Sat, 16 Jun 2018 16:20:06 +0200
Subject: [PATCH] feat: Add sql statement to create annotations table

---
 gemeinsamforschen/src/scripts/dbschema/fltrail.sql | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gemeinsamforschen/src/scripts/dbschema/fltrail.sql b/gemeinsamforschen/src/scripts/dbschema/fltrail.sql
index d7978655..7e6e05ef 100644
--- a/gemeinsamforschen/src/scripts/dbschema/fltrail.sql
+++ b/gemeinsamforschen/src/scripts/dbschema/fltrail.sql
@@ -35,7 +35,18 @@ CREATE TABLE projectuser
         (
           projectId varchar(400) NOT NULL,
           userId varchar(400) NOT NULL
-);  ENGINE=InnoDB DEFAULT CHARSET=utf8;
+)  ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `annotations` (
+ `id` varchar(120) NOT NULL,
+ `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `userId` int(11) DEFAULT NULL,
+ `targetId` int(11) DEFAULT NULL,
+ `body` varchar(280) DEFAULT NULL,
+ `startCharacter` int(11) DEFAULT NULL,
+ `endCharacter` int(11) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 alter table users
   add isStudent tinyint(1) default '1' null;
-- 
GitLab