1 /* Unique Ids sequence generator */
3 drop sequence SEQ_GEN_SEQUENCE;
4 create sequence SEQ_GEN_SEQUENCE INCREMENT BY 50;
9 DROP TABLE IF EXISTS attribute_group CASCADE;
10 CREATE TABLE attribute_group (
11 id bigint NOT NULL PRIMARY KEY
14 DROP TABLE IF EXISTS attribute CASCADE;
15 CREATE TABLE attribute (
16 id bigint NOT NULL PRIMARY KEY,
20 attribute_group_id bigint REFERENCES attribute_group (id),
27 DROP TABLE IF EXISTS gde_file CASCADE;
28 CREATE TABLE gde_file (
29 id bigint NOT NULL PRIMARY KEY,
32 checksum varchar(255),
33 creation_date timestamp,
34 update_date timestamp,
37 deletion_date timestamp,
38 attribute_group_id bigint REFERENCES attribute_group (id)
41 DROP TABLE IF EXISTS chunk CASCADE;
43 id bigint NOT NULL PRIMARY KEY,
44 file_id bigint NOT NULL REFERENCES gde_file (id),
46 checksum varchar(255),
53 DROP TABLE IF EXISTS study CASCADE;
55 id bigint NOT NULL PRIMARY KEY,
57 creation_date timestamp,
58 update_date timestamp,
61 deletion_date timestamp,
62 attribute_group_id bigint REFERENCES attribute_group (id)
67 DROP TABLE IF EXISTS profile CASCADE;
68 CREATE TABLE profile (
69 id bigint NOT NULL PRIMARY KEY,
73 DROP TABLE IF EXISTS profile_attribute CASCADE;
74 CREATE TABLE profile_attribute (
75 id bigint NOT NULL PRIMARY KEY,
79 profile_id bigint REFERENCES profile (id)