From b89ce2ee1798c20d8398ff5964b28d3b3e6d9a58 Mon Sep 17 00:00:00 2001
From: Jorrit Schaap <schaap@astron.nl>
Date: Thu, 12 May 2016 13:16:14 +0000
Subject: [PATCH] Task #9349: made mom_id and otdb_id in task table unique

---
 .../ResourceAssignmentDatabase/sql/create_database.sql        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/SAS/ResourceAssignment/ResourceAssignmentDatabase/sql/create_database.sql b/SAS/ResourceAssignment/ResourceAssignmentDatabase/sql/create_database.sql
index 4fd10e07875..985594488bf 100644
--- a/SAS/ResourceAssignment/ResourceAssignmentDatabase/sql/create_database.sql
+++ b/SAS/ResourceAssignment/ResourceAssignmentDatabase/sql/create_database.sql
@@ -141,8 +141,8 @@ ALTER TABLE resource_allocation.specification
 
 CREATE TABLE resource_allocation.task (
   id serial NOT NULL,
-  mom_id integer,
-  otdb_id integer,
+  mom_id integer UNIQUE,
+  otdb_id integer UNIQUE,
   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  ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE,
-- 
GitLab