Salome HOME
Attribute DAO
[modules/gde.git] / projects / GDE_App / src / GDE_DB_Init.sql
index cbe52a752f2c138b4609853079b4fcbe50c740ed..369f5a9e35d165c78ee8adbfa49e96a7791874dd 100644 (file)
@@ -51,6 +51,14 @@ CREATE TABLE attribute (
     mandatory boolean
 );
 
+DROP TABLE IF EXISTS attribute_group_attribute CASCADE;
+CREATE TABLE attribute_group_attribute (
+    attributegroup_id bigint REFERENCES attribute_group (id),
+    attribute_id bigint REFERENCES attribute(id)
+);
+CREATE INDEX attribute_group_attribute_idx1 on attribute_group_attribute(attributegroup_id);
+CREATE INDEX attribute_group_attribute_idx2 on attribute_group_attribute(attribute_id);
+
 /* DATA */
 
 DROP TABLE IF EXISTS gde_file CASCADE;
@@ -90,9 +98,9 @@ CREATE TABLE study (
     deleted boolean,
     deletion_date timestamp,
     attribute_group_id bigint REFERENCES attribute_group (id),
-    profile_id bigint REFERENCES profile (id)
+    profile_id bigint REFERENCES profile (id),
+    locked boolean
 );
-
 /* PROFILES */
 
 DROP TABLE IF EXISTS profile CASCADE;