From bf7f81815c1d170c3e2d58921fd761ec00b982c8 Mon Sep 17 00:00:00 2001 From: "Ozcan Aytac; Insylva project" Date: Fri, 24 Jul 2020 10:33:35 +0200 Subject: [PATCH] * --- data.sql | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/data.sql b/data.sql index 54b060e..bf4a448 100644 --- a/data.sql +++ b/data.sql @@ -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, @@ -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,