Salome HOME
Added cascade constraint on attribute and profile tables
authorKavoos Bojnourdi <kavoos.bojnourdi@edf.fr>
Sat, 15 Aug 2015 14:58:54 +0000 (16:58 +0200)
committerKavoos Bojnourdi <kavoos.bojnourdi@edf.fr>
Sat, 15 Aug 2015 14:58:54 +0000 (16:58 +0200)
projects/GDE_App/src/GDE_DB_Init.sql

index 870b5f2febb595da45374c1f30fe115f59affa8d..c4d0c012ff3e16ee53a7f773935aeff48c712d26 100644 (file)
@@ -49,7 +49,7 @@ CREATE TABLE attribute (
     name varchar(255),
     type varchar(255),
     value varchar(255),
-    attribute_group_id bigint not null REFERENCES attribute_group (id),
+    attribute_group_id bigint not null REFERENCES attribute_group (id)  on delete cascade on update cascade,
     mandatory boolean
 );
 
@@ -67,7 +67,7 @@ CREATE TABLE profile_attribute (
     name varchar(255),
     type varchar(255),
     mandatory boolean,
-    profile_id bigint not null REFERENCES profile (id)
+    profile_id bigint not null REFERENCES profile (id) on delete cascade on update cascade
 );
 
 /* DATA */