#29170: Oracle - Unable to add triggers in migrations, semicolon removed.
-------------------------------------+-------------------------------------
Reporter: Danny Willems | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 3.0
(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
-------------------------------------+-------------------------------------
Changes (by Václav Řehák):
* status: closed => new
* version: 1.11 => 3.0
* resolution: worksforme =>
Comment:
Hi,
I encountered exactly the same issue. To reproduce see migration
0002_add_trigger in https://github.com/washeck/django-tutorial
manage.py migrate fails with
{{{
Applying polls.0002_add_trigger...Traceback (most recent call last):
File "/home/vaclav/.local/share/virtualenvs/django-tutorial-
eSoqXmQ3/lib/python3.6/site-packages/django/db/backends/utils.py", line
84, in _execute
return self.cursor.execute(sql)
File "/home/vaclav/.local/share/virtualenvs/django-tutorial-
eSoqXmQ3/lib/python3.6/site-packages/django/db/backends/oracle/base.py",
line 517, in execute
return self.cursor.execute(query, self._param_generator(params))
cx_Oracle.DatabaseError: ORA-24373: invalid length specified for statement
}}}
When I remove the slash, the migration applies but the trigger is
incorrect and
{{{
select * from user_errors where type = 'TRIGGER' and name =
'TRIG_PREVENT_QUESTION_DELETE';
}}}
shows
{{{
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the
following:
; <an identifier> <a double-quoted delimited-identifier>
The symbol ";" was substituted for "end-of-file" to continue.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29170#comment:5>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/070.45e482191e10f765f6e9c156a73119f4%40djangoproject.com.