Salome HOME
Attribute DAO
[modules/gde.git] / projects / GDE_App / src / GDE_DB_Init.sql
index 96c5cdd6317ec301d8eae4a655223027cf094287..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;
@@ -93,7 +101,6 @@ CREATE TABLE study (
     profile_id bigint REFERENCES profile (id),
     locked boolean
 );
-
 /* PROFILES */
 
 DROP TABLE IF EXISTS profile CASCADE;