Triggers not supported in Oracle

13 views
Skip to first unread message

Davide Musiani

unread,
Jul 9, 2013, 8:34:15 AM7/9/13
to autopat...@googlegroups.com
Hi, 
I'm trying to use Autopatch 1.4.2 to deploy to an Oracle database.
Some of my patches include the definition of triggers; for example one patch includes:

CREATE OR REPLACE TRIGGER TBI_PRZ_OUT_EVENT_INFO
   BEFORE UPDATE
   ON PRZ_OUT_EVENT    FOR EACH ROW
DECLARE
   info_loc   VARCHAR2 (256);
BEGIN
    .....
    ..... (trugger code)
    .....
END;


This patch and trigger defiintion always fails.
As far as I can see (I'm not a very skilled java developer), it seems in SqlScriptMigrationTask.java that triggers are not supported at all, since the only keywords allowing to mark a statement as "stored procedure" are:

"begin" or
"create or replace method" or
"create or replace function" or
"create or replace procedure" or
"create or replace package".

In my DB the trigger object is created but with errors, since Autopatch truncates the code at the first";", which means I get:

CREATE OR REPLACE TRIGGER TBI_PRZ_OUT_EVENT_INFO
   BEFORE UPDATE
   ON PRZ_OUT_EVENT    FOR EACH ROW
DECLARE
   info_loc   VARCHAR2 (256);

which obviously does not compile properly.

Any suggestion on how to workaround this?
Any possibility to fix it?

Thanks

Reply all
Reply to author
Forward
0 new messages