diff --git a/SAS/ResourceAssignment/ResourceAllocationDatabase/sql/create_database.sql b/SAS/ResourceAssignment/ResourceAllocationDatabase/sql/create_database.sql
index 0709e2dab78c698bae5c823c9084980d7b7a295e..e19485b1fc16a21e8a31db630d4ea4ed005e3971 100644
--- a/SAS/ResourceAssignment/ResourceAllocationDatabase/sql/create_database.sql
+++ b/SAS/ResourceAssignment/ResourceAllocationDatabase/sql/create_database.sql
@@ -132,7 +132,7 @@ CREATE TABLE resource_allocation.task (
   otdb_id integer,
   status_id integer NOT NULL REFERENCES resource_allocation.task_status DEFERRABLE INITIALLY IMMEDIATE,
   type_id integer NOT NULL REFERENCES resource_allocation.task_type DEFERRABLE INITIALLY IMMEDIATE,
-  specification_id integer NOT NULL REFERENCES resource_allocation.specification DEFERRABLE INITIALLY IMMEDIATE,
+  specification_id integer NOT NULL REFERENCES resource_allocation.specification  ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE,
   PRIMARY KEY (id)
 ) WITH (OIDS=FALSE);
 ALTER TABLE resource_allocation.task