Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fltrail
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fides
fltrail
Commits
8e958114
Commit
8e958114
authored
6 years ago
by
Martin Stähr
Browse files
Options
Downloads
Patches
Plain Diff
feat: update sql database schema of communication branch
parent
2e9d400f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gemeinsamforschen/src/scripts/dbschema/fltrail.sql
+70
-51
70 additions, 51 deletions
gemeinsamforschen/src/scripts/dbschema/fltrail.sql
with
70 additions
and
51 deletions
gemeinsamforschen/src/scripts/dbschema/fltrail.sql
+
70
−
51
View file @
8e958114
SET
SQL_MODE
=
"NO_AUTO_VALUE_ON_ZERO"
;
SET
time_zone
=
"+00:00"
;
CREATE
DATABASE
IF
NOT
EXISTS
`fltrail`
DEFAULT
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
;
USE
`fltrail`
;
/*!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 utf8mb4 */
;
CREATE
TABLE
if
not
exists
`projects`
(
`id`
varchar
(
400
)
NOT
NULL
,
`password`
varchar
(
400
)
NOT
NULL
,
`active`
tinyint
(
1
)
NOT
NULL
,
`timecreated`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
,
`author`
varchar
(
400
)
NOT
NULL
,
`adminPassword`
varchar
(
400
)
NOT
NULL
,
`token`
varchar
(
400
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
CREATE
DATABASE
IF
NOT
EXISTS
`fltrail`
DEFAULT
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
;
USE
`fltrail`
;
CREATE
TABLE
if
not
exists
`groups`
(
`id`
int
NOT
NULL
AUTO_INCREMENT
,
`projectId`
varchar
(
400
)
NOT
NULL
,
`chatRoomId`
varchar
(
400
)
NOT
NULL
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
CREATE
TABLE
`projects`
(
`id`
varchar
(
400
)
NOT
NULL
,
`password`
varchar
(
400
)
NOT
NULL
,
`activ`
tinyint
(
1
)
NOT
NULL
,
`timecreated`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
,
`author`
varchar
(
400
)
NOT
NULL
,
`adminpassword`
varchar
(
400
)
NOT
NULL
,
`token`
varchar
(
400
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
CREATE
TABLE
`tags`
(
`projectId`
varchar
(
400
)
NOT
NULL
,
`tag`
varchar
(
400
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
CREATE
TABLE
`users`
(
`name`
varchar
(
400
)
NOT
NULL
,
`password`
varchar
(
200
)
NOT
NULL
,
`email`
varchar
(
400
)
NOT
NULL
,
`token`
varchar
(
800
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
CREATE
TABLE
projectuser
(
projectId
varchar
(
400
)
NOT
NULL
,
userId
varchar
(
400
)
NOT
NULL
)
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
;
CREATE
TABLE
if
not
exists
groupuser
(
userEmail
varchar
(
400
)
NOT
NULL
,
groupId
int
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
alter
table
users
add
isStudent
tinyint
(
1
)
default
'1'
null
;
CREATE
TABLE
if
not
exists
`tags`
(
`projectId`
varchar
(
400
)
NOT
NULL
,
`tag`
varchar
(
400
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
CREATE
TABLE
if
not
exists
`users`
(
`name`
varchar
(
400
)
NOT
NULL
,
`password`
varchar
(
200
)
NOT
NULL
,
`email`
varchar
(
255
)
NOT
NULL
,
`token`
varchar
(
800
)
NOT
NULL
,
`rocketChatId`
varchar
(
400
)
NOT
NULL
,
`rocketChatAuthToken`
varchar
(
800
)
NOT
NULL
,
UNIQUE
(
email
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
CREATE
TABLE
if
not
exists
projectuser
(
projectId
varchar
(
400
)
NOT
NULL
,
userId
varchar
(
400
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
CREATE
TABLE
if
not
exists
`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
;
/*!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 */
;
alter
table
users
add
isStudent
tinyint
(
1
)
default
'1'
null
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment