#29170: Oracle - Unable to add triggers in migrations, semicolon removed.
-------------------------------------+-------------------------------------
Reporter: Danny Willems | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle trigger | Triage Stage:
database | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Danny Willems):
Replying to [comment:1 felixxm]:
> IMO you missed trailing "/" in the trigger statement:
>
> {{{
> create_trigger_insert_entry = """
> CREATE OR REPLACE TRIGGER UPDATE_BALANCE
> AFTER DELETE OR INSERT OR UPDATE OF AMOUNT ON ENTRY
> BEGIN
> UPDATE ACCOUNT_BALANCE B
> SET (B.BALANCE, B.ACCOUNT) = (SELECT SUM(AMOUNT) sum_amount,
account
> FROM ENTRY e WHERE e.ACCOUNT = B.ACCOUNT
GROUP BY ACCOUNT)
> WHERE EXISTS (SELECT 1 FROM ENTRY e WHERE e.ACCOUNT = B.ACCOUNT);
> END;
> /"""
> }}}
>
> Can you confirm that it doesn't work with trailing slash?
I confirm it doesn't work. We have this exception:
{{{
django.db.utils.DatabaseError: ORA-24373: invalid length specified for
statement
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29170#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/070.d5e95af8db5543d1fab572519fb78fda%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.