Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DBRepo
Manage
Activity
Members
Labels
Plan
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FAIR Data Austria DB Repository
DBRepo
Commits
16ebdf41
Commit
16ebdf41
authored
3 years ago
by
Cornelia Michlits
Browse files
Options
Downloads
Patches
Plain Diff
104 ontology - adjust MDB schema, add tables, e.g. mdb_concepts
parent
2b28ee68
No related branches found
No related tags found
4 merge requests
!81
New stable release
,
!43
Merge dev to master
,
!33
Draft: merge dev to master
,
!32
Add units-service to dev
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
fda-metadata-db/initi.sh
+24
-1
24 additions, 1 deletion
fda-metadata-db/initi.sh
fda-units-service/validate.py
+1
-1
1 addition, 1 deletion
fda-units-service/validate.py
with
25 additions
and
2 deletions
fda-metadata-db/initi.sh
+
24
−
1
View file @
16ebdf41
...
@@ -161,6 +161,13 @@ psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-E
...
@@ -161,6 +161,13 @@ psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-E
NO MAXVALUE
NO MAXVALUE
CACHE 1;
CACHE 1;
CREATE SEQUENCE public.mdb_concept_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
CREATE TABLE IF NOT EXISTS mdb_DATABASES (
CREATE TABLE IF NOT EXISTS mdb_DATABASES (
ID bigint PRIMARY KEY DEFAULT nextval('mdb_databases_seq'),
ID bigint PRIMARY KEY DEFAULT nextval('mdb_databases_seq'),
container_id bigint REFERENCES mdb_CONTAINER(id),
container_id bigint REFERENCES mdb_CONTAINER(id),
...
@@ -294,6 +301,22 @@ psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-E
...
@@ -294,6 +301,22 @@ psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-E
PRIMARY KEY(cDBID, tID, cID)
PRIMARY KEY(cDBID, tID, cID)
);
);
CREATE TABLE IF NOT EXISTS mdb_concepts (
oID bigint DEFAULT nextval('mdb_concept_seq'),
name TEXT,
URI TEXT,
PRIMARY KEY(oID)
);
CREATE TABLE IF NOT EXISTS mdb_columns_concepts (
cDBID bigint,
tID bigint,
cID bigint,
oID bigint REFERENCES mdb_concepts(oID),
FOREIGN KEY (cDBID,tID, cID) REFERENCES mdb_COLUMNS(cDBID,tID,ID),
PRIMARY KEY(cDBID,tID,cID)
);
CREATE SEQUENCE public.mdb_view_seq
CREATE SEQUENCE public.mdb_view_seq
START WITH 1
START WITH 1
INCREMENT BY 1
INCREMENT BY 1
...
...
This diff is collapsed.
Click to expand it.
fda-units-service/validate.py
+
1
−
1
View file @
16ebdf41
...
@@ -23,6 +23,6 @@ def validator(value):
...
@@ -23,6 +23,6 @@ def validator(value):
def
stringmapper
(
thisstring
):
def
stringmapper
(
thisstring
):
if
'
'
in
thisstring
:
if
'
'
in
thisstring
:
return
thisstring
.
split
(
"
"
,
1
)[
0
]
+
thisstring
.
split
(
"
"
,
1
)[
1
].
title
().
replace
(
"
"
,
""
)
return
thisstring
.
split
(
"
"
,
1
)[
0
]
.
lower
()
+
thisstring
.
split
(
"
"
,
1
)[
1
].
title
().
replace
(
"
"
,
""
)
else
:
else
:
return
thisstring
return
thisstring
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Cornelia Michlits
@cornelia.michlits
mentioned in commit
bab0733b
·
3 years ago
mentioned in commit
bab0733b
mentioned in commit bab0733be3438acfdf87d92b7014fa71f4176167
Toggle commit list
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