Hi
When I use a
lb generate-schema
to generate XML for triggers it adds an ALTER TRIGGER that is not part of the source
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:n0="http://www.oracle.com/xml/ns/dbchangelog-ext"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<changeSet id="1f856f938cc605a6337cb2824f9fcb41f026cb62" author="(XXSDU)-Generated" failOnError="false" runOnChange="true" runAlways="false" >
<n0:createOracleTrigger objectName="RC_CONTRACT_BIU" objectType="TRIGGER" ownerName="XXSDU" replaceIfExists="true" >
<n0:source><![CDATA[
CREATE OR REPLACE EDITIONABLE TRIGGER "XXSDU"."RC_CONTRACT_BIU"
before insert or update
on rc_contract
for each row
begin
if inserting then
:new.created := sysdate;
:new.created_by := coalesce(sys_context('APEX$SESSION','APP_USER'),user);
end if;
:new.updated := sysdate;
:new.updated_by := coalesce(sys_context('APEX$SESSION','APP_USER'),user);
end rc_contract_biu;
ALTER TRIGGER "XXSDU"."RC_CONTRACT_BIU" ENABLE]]></n0:source>
</n0:createOracleTrigger>
</changeSet>
</databaseChangeLog>
When I then the use
lb update
to update another database it complains about the very same ALTER TRIGGER statement:
Running Changeset: trigger/rc_contract_biu_trigger.xml::1f856f938cc605a6337cb2824f9fcb41f026cb62::(XXSDU)-Generated
Trigger RC_CONTRACT_BIU compiled
LINE/COL ERROR
--------- -------------------------------------------------------------
10/1 PLS-00103: Encountered the symbol "ALTER"
Errors: check compiler log
Rolling back changeset.
Rollback completed successfully.
How do I fix this?
Thanks in advance
Kind regards
Soeren D.