Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#22498 closed Bug (fixed)

Oracle test failure in migrations: identifier is too long

Reported by: Tim Graham Owned by: nobody
Component: Migrations Version: 1.7-beta-2
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

$ ./runtests.py --settings=test_oracle migrations
Testing against Django installed in '/home/tim/code/django/django'
Creating test database for alias 'default'...
Creating test user...
Creating test database for alias 'other'...
Creating test user...
.................................................s............................................E....
======================================================================
ERROR: test_remove_fk (migrations.test_operations.OperationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/migrations/test_operations.py", line 468, in test_remove_fk
    operation.database_backwards("test_rfk", editor, new_state, project_state)
  File "/home/tim/code/django/django/db/backends/schema.py", line 82, in __exit__
    self.execute(sql)
  File "/home/tim/code/django/django/db/backends/schema.py", line 98, in execute
    cursor.execute(sql, params)
  File "/home/tim/code/django/django/db/backends/utils.py", line 59, in execute
    return self.cursor.execute(sql, params)
  File "/home/tim/code/django/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/home/tim/code/django/django/db/backends/utils.py", line 59, in execute
    return self.cursor.execute(sql, params)
  File "/home/tim/code/django/django/db/backends/oracle/base.py", line 879, in execute
    return self.cursor.execute(query, self._param_generator(params))
DatabaseError: ORA-00972: identifier is too long

Change History (3)

comment:1 by Tim Graham, 11 years ago

The offending query is ALTER TABLE "TEST_RFK_RIDER" ADD CONSTRAINT pony_id_refs_id_3e34515040abc59a FOREIGN KEY ("PONY_ID") REFERENCES "TEST_RFK_PONY" ("ID") DEFERRABLE INITIALLY DEFERRED as len('pony_id_refs_id_3e34515040abc59a') > 30 (the limit on Oracle). Shai said he will look at it later.

comment:2 by Shai Berger <shai@…>, 11 years ago

Resolution: fixed
Status: newclosed

In b8b179bbf50f8ec3e2102f7109c594cb1ba85e93:

[1.7.x] Fixed #22498 -- constraint name was not quoted in FK creation SQL

Backport of 843613add4 from master

comment:3 by Shai Berger <shai@…>, 11 years ago

In 843613add4d5e7493140fedd10c40c41706b68a8:

Fixed #22498 -- constraint name was not quoted in FK creation SQL

Note: See TracTickets for help on using tickets.
Back to Top