details: http://code.openbravo.com/erp/devel/pi/rev/8896b8692e52 changeset: 3343:8896b8692e52 user: David Alsasua <david.alsasua <at> openbravo.com> date: Fri Mar 06 17:25:51 2009 +0100 summary: Alerts trigers modification
diffstat: 3 files changed, 3 insertions(+), 11 deletions(-) src-db/database/model/tables/AD_ALERTRECIPIENT.xml | 2 +- src-db/database/model/tables/AD_ALERTRULE_TRL.xml | 2 +- src-db/database/model/triggers/AD_ALERTRULE_TRG.xml | 10 +--------- diffs (50 lines): diff -r d7d12c6202fa -r 8896b8692e52 src-db/database/model/tables/AD_ALERTRECIPIENT.xml --- a/src-db/database/model/tables/AD_ALERTRECIPIENT.xml Fri Mar 06 16:59:12 2009 +0100 +++ b/src-db/database/model/tables/AD_ALERTRECIPIENT.xml Fri Mar 06 17:25:51 2009 +0100 @@ -49,7 +49,7 @@ <default><![CDATA[Y]]></default> <onCreateDefault/> </column> - <foreign-key foreignTable="AD_ALERTRULE" name="ADALERTRULE_ADALERTRECIPIENT"> + <foreign-key foreignTable="AD_ALERTRULE" name="ADALERTRULE_ADALERTRECIPIENT" onDelete="cascade"> <reference local="AD_ALERTRULE_ID" foreign="AD_ALERTRULE_ID"/> </foreign-key> <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADALERTRECIPIENT"> diff -r d7d12c6202fa -r 8896b8692e52 src-db/database/model/tables/AD_ALERTRULE_TRL.xml --- a/src-db/database/model/tables/AD_ALERTRULE_TRL.xml Fri Mar 06 16:59:12 2009 +0100 +++ b/src-db/database/model/tables/AD_ALERTRULE_TRL.xml Fri Mar 06 17:25:51 2009 +0100 @@ -52,7 +52,7 @@ <foreign-key foreignTable="AD_ALERTRULE" name="ADALERTRULE_ADALERTRULETRL" onDelete="cascade"> <reference local="AD_ALERTRULE_ID" foreign="AD_ALERTRULE_ID"/> </foreign-key> - <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADALERRTRULETRL"> + <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADALERRTRULETRL" onDelete="cascade"> <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/> </foreign-key> <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_ADALERTRULETRL"> diff -r d7d12c6202fa -r 8896b8692e52 src-db/database/model/triggers/AD_ALERTRULE_TRG.xml --- a/src-db/database/model/triggers/AD_ALERTRULE_TRG.xml Fri Mar 06 16:59:12 2009 +0100 +++ b/src-db/database/model/triggers/AD_ALERTRULE_TRG.xml Fri Mar 06 17:25:51 2009 +0100 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <database name="TRIGGER AD_ALERTRULE_TRG"> - <trigger name="AD_ALERTRULE_TRG" table="AD_ALERTRULE" fires="after" insert="true" update="true" delete="true" foreach="row"> + <trigger name="AD_ALERTRULE_TRG" table="AD_ALERTRULE" fires="after" insert="true" update="true" delete="false" foreach="row"> <body><![CDATA[ @@ -75,14 +75,6 @@ WHERE AD_AlertRule_ID=:new.AD_AlertRule_ID; END IF; END IF; - - IF DELETING THEN - DELETE FROM AD_AlertRule_Trl - WHERE AD_AlertRule_ID=:old.AD_AlertRule_ID; - - DELETE FROM AD_AlertRecipient - WHERE AD_AlertRule_ID=:old.AD_AlertRule_ID; - END IF; END AD_ALERTRULE_TRG ]]></body> </trigger> ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits