Skip to content

Commit

Permalink
*
Browse files Browse the repository at this point in the history
  • Loading branch information
Ozcan Aytac; Insylva project committed Jul 24, 2020
1 parent 2b65c3d commit bf7f818
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,30 @@ CREATE TABLE IF NOT EXISTS sources (
updatedAt timestamp
);

CREATE table IF NOT EXISTS std_fields(
id serial UNIQUE NOT NULL,
std_field_id integer,

category varchar(100),
field_name varchar(250),
definition_and_comment varchar(250),
obligation_or_condition varchar(250),
cardinality varchar(200),
field_type varchar(100),
values text,

isPublic BOOLEAN,
isOptional BOOLEAN,
PRIMARY KEY (id),

CONSTRAINT std_fields_id_fkkey FOREIGN KEY (std_field_id)
REFERENCES std_fields(id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,

createdAt timestamp NOT NULL DEFAULT NOW(),
updatedAt timestamp
);

CREATE TABLE IF NOT EXISTS sources_indices(
id serial PRIMARY KEY,
source_id integer,
Expand Down Expand Up @@ -161,30 +185,6 @@ CREATE table IF NOT EXISTS provider_sources (
updatedAt timestamp
);

CREATE table IF NOT EXISTS std_fields(
id serial UNIQUE NOT NULL,
std_field_id integer,

category varchar(100),
field_name varchar(250),
definition_and_comment varchar(250),
obligation_or_condition varchar(250),
cardinality varchar(200),
field_type varchar(100),
values text,

isPublic BOOLEAN,
isOptional BOOLEAN,
PRIMARY KEY (id),

CONSTRAINT std_fields_id_fkkey FOREIGN KEY (std_field_id)
REFERENCES std_fields(id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,

createdAt timestamp NOT NULL DEFAULT NOW(),
updatedAt timestamp
);

CREATE table IF NOT EXISTS std_fields_values(
id serial UNIQUE NOT NULL,
std_field_id int NOT NULL,
Expand Down

0 comments on commit bf7f818

Please sign in to comment.