merge
authorAsier Lostalé <asier.lostale@openbravo.com>
Tue, 05 Apr 2011 11:32:45 +0200
changeset 11482 6fd7146adf40
parent 11480 6a0351112708 (current diff)
parent 11481 ca0accaf4bc9 (diff)
child 11483 ba863d26907f
merge
--- a/src-db/database/model/triggers/AD_MODULE_TRG2.xml	Mon Apr 04 14:31:50 2011 +0200
+++ b/src-db/database/model/triggers/AD_MODULE_TRG2.xml	Tue Apr 05 11:32:45 2011 +0200
@@ -25,8 +25,8 @@
     IF AD_isTriggerEnabled()='N' THEN RETURN;
     END IF;
 
-  --Check the only updated column is isConfigScriptApplied. In this case maitin updated
-  --column as it was to prevent changes detection when trying to update database
+  --Check the only updated column is 'isConfigScriptApplied' or 'IsInDevelopment'. In this case maintain updated(timestamp)
+  --column as it was to prevent changes detection when trying to update database.
   IF (COALESCE(:OLD.ISACTIVE             ,'.') = COALESCE(:NEW.ISACTIVE             ,'.') AND
       COALESCE(:OLD.NAME                 ,'.') = COALESCE(:NEW.NAME                 ,'.') AND
       COALESCE(:OLD.VERSION              ,'.') = COALESCE(:NEW.VERSION              ,'.') AND
@@ -34,8 +34,7 @@
       COALESCE(:OLD.HELP                 ,'.') = COALESCE(:NEW.HELP                 ,'.') AND
       COALESCE(:OLD.URL                  ,'.') = COALESCE(:NEW.URL                  ,'.') AND
       COALESCE(:OLD.TYPE                 ,'.') = COALESCE(:NEW.TYPE                 ,'.') AND
-      COALESCE(:OLD.LICENSE              ,'.') = COALESCE(:NEW.LICENSE              ,'.') AND
-      COALESCE(:OLD.ISINDEVELOPMENT      ,'.') = COALESCE(:NEW.ISINDEVELOPMENT      ,'.') AND
+      COALESCE(:OLD.LICENSE              ,'.') = COALESCE(:NEW.LICENSE              ,'.') AND      
       COALESCE(:OLD.ISDEFAULT            ,'.') = COALESCE(:NEW.ISDEFAULT            ,'.') AND
       COALESCE(:OLD.SEQNO                , -1) = COALESCE(:NEW.SEQNO                , -1) AND
       COALESCE(:OLD.JAVAPACKAGE          ,'.') = COALESCE(:NEW.JAVAPACKAGE          ,'.') AND
@@ -58,7 +57,8 @@
       COALESCE(:OLD.MATURITY_UPDATE      ,'.') = COALESCE(:NEW.MATURITY_UPDATE      ,'.') AND
       COALESCE(:OLD.COMMERCIAL_TIER      ,'.') = COALESCE(:NEW.COMMERCIAL_TIER      ,'.') AND
       COALESCE(:OLD.ENABLED              ,'.') = COALESCE(:NEW.ENABLED              ,'.') AND
-               :OLD.ISCONFIGSCRIPTAPPLIED  != :NEW.ISCONFIGSCRIPTAPPLIED)  THEN
+               (:OLD.ISCONFIGSCRIPTAPPLIED  != :NEW.ISCONFIGSCRIPTAPPLIED OR
+               COALESCE(:OLD.ISINDEVELOPMENT      ,'.') != COALESCE(:NEW.ISINDEVELOPMENT      ,'.')))  THEN
     :NEW.UPDATED := :OLD.UPDATED;
   END IF;