From 2b0f935cd74b81eb1e87365072fe9ad034139a20 Mon Sep 17 00:00:00 2001
From: kaloyane <kaloyane>
Date: Fri, 8 Jul 2011 14:13:34 +0000
Subject: [PATCH] [LMS-2389] screening-specific migration : the property
 "DESCRIPTION" should be optional for materials "VIRUS", "BACTERIUM",
 "COMPOUND"

SVN: 22067
---
 .../sql/postgresql/migration/migration-074-075.sql     | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 screening/source/sql/postgresql/migration/migration-074-075.sql

diff --git a/screening/source/sql/postgresql/migration/migration-074-075.sql b/screening/source/sql/postgresql/migration/migration-074-075.sql
new file mode 100644
index 00000000000..68dc983639e
--- /dev/null
+++ b/screening/source/sql/postgresql/migration/migration-074-075.sql
@@ -0,0 +1,10 @@
+---------------------------------------------
+-- the property "DESCRIPTION" should be optional for materials "VIRUS", "BACTERIUM", "COMPOUND"
+-- (screening-specific requirement)
+---------------------------------------------
+UPDATE material_type_property_types 
+    SET is_mandatory=FALSE 
+    WHERE 
+        maty_id IN (SELECT id FROM material_types WHERE code IN ('VIRUS', 'BACTERIUM', 'COMPOUND'))
+    AND
+        prty_id = (SELECT id FROM property_types WHERE code='DESCRIPTION');
-- 
GitLab