From 65f6ed5103df876df2c0a505839bb6334cd10cde Mon Sep 17 00:00:00 2001 From: Kavoos Bojnourdi Date: Sat, 15 Aug 2015 16:58:54 +0200 Subject: [PATCH] Added cascade constraint on attribute and profile tables --- projects/GDE_App/src/GDE_DB_Init.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/GDE_App/src/GDE_DB_Init.sql b/projects/GDE_App/src/GDE_DB_Init.sql index 870b5f2..c4d0c01 100644 --- a/projects/GDE_App/src/GDE_DB_Init.sql +++ b/projects/GDE_App/src/GDE_DB_Init.sql @@ -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 */ -- 2.39.2