[Django] #26833: alter_field() fails to drop indexes on columns with mixed case on Oracle

15 views
Skip to first unread message

Django

unread,
Jul 3, 2016, 2:18:04 PM7/3/16
to django-...@googlegroups.com
#26833: alter_field() fails to drop indexes on columns with mixed case on Oracle
----------------------------+--------------------
Reporter: jdufresne | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------
On fields that set `db_column` with mixed case, `alter_field()` fails to
drop indexes on Oracle.

Due to Oracle's `uppercases_column_names` feature,
[https://github.com/django/django/blob/8db889eaf7dce0cb715b075be32047c1b1b316da/django/db/backends/oracle/introspection.py#L158
get_constraints() returns all columns as lower case]. However,
`alter_field()` use of
[https://github.com/django/django/blob/8db889eaf7dce0cb715b075be32047c1b1b316da/django/db/backends/base/schema.py#L938-L961
_constraint_names()] compares the column name as set by `db_column`. This
must be accounted for on Oracle for the index to be properly dropped.

--
Ticket URL: <https://code.djangoproject.com/ticket/26833>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 3, 2016, 2:37:35 PM7/3/16
to django-...@googlegroups.com
#26833: alter_field() fails to drop indexes on columns with mixed case on Oracle
----------------------------+--------------------------------------

Reporter: jdufresne | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by jdufresne):

* needs_better_patch: => 0
* has_patch: 0 => 1
* needs_tests: => 0
* needs_docs: => 0


Comment:

https://github.com/django/django/pull/6878

--
Ticket URL: <https://code.djangoproject.com/ticket/26833#comment:1>

Django

unread,
Jul 5, 2016, 12:41:42 PM7/5/16
to django-...@googlegroups.com
#26833: alter_field() fails to drop indexes on columns with mixed case on Oracle
-------------------------------------+-------------------------------------

Reporter: jdufresne | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by akki):

* component: Migrations => Database layer (models, ORM)
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/26833#comment:2>

Django

unread,
Jul 7, 2016, 8:09:52 AM7/7/16
to django-...@googlegroups.com
#26833: alter_field() fails to drop indexes on columns with mixed case on Oracle
-------------------------------------+-------------------------------------
Reporter: jdufresne | Owner: nobody
Type: Bug | Status: closed

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"34108204603b39b3e4e58cb46012736a4986e6d8" 3410820]:
{{{
#!CommitTicketReference repository=""
revision="34108204603b39b3e4e58cb46012736a4986e6d8"
Fixed #26833 -- Fixed SchemaEditor._constraint_names() to handle
features.uppercases_column_names.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26833#comment:3>

Reply all
Reply to author
Forward
0 new messages