Opened 3 years ago

Last modified 7 months ago

#33671 assigned Bug

Migrations crashes when adding/altering collations on indexed columns on Oracle.

Reported by: Mariusz Felisiak Owned by: Mahesh Gupta
Component: Migrations Version: 4.0
Severity: Normal Keywords: oracle collation
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Migrations crashes when adding/altering collations on indexed columns on Oracle:

ORA-43923: The column cannot be modified to the specified collation.

Primary keys are handled in PR. Fields with indexes defined via db_index=True, Meta.indexes, Meta.constraints, and unique=True are still affected.

Change History (10)

comment:1 by GitHub <noreply@…>, 3 years ago

In 1b3a949b:

Refs #33671 -- Fixed migrations crash when adding collation to a primary key on Oracle.

comment:2 by Carlton Gibson, 3 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Durval Carvalho, 20 months ago

Since this issue has been resolved in PR #15642 and PR #15629, I am going to close this ticket.

comment:4 by Durval Carvalho, 20 months ago

Resolution: fixed
Status: newclosed

comment:5 by Mariusz Felisiak, 20 months ago

Resolution: fixed
Status: closednew

Please don't close unresolved tickets. Have you checked the ticket description?

Primary keys are handled in ​PR. Fields with indexes defined via db_index=True, Meta.indexes, Meta.constraints, and unique=True are still affected.

comment:6 by Mahesh Gupta, 8 months ago

Owner: changed from nobody to Mahesh Gupta
Status: newassigned

comment:7 by Mahesh Gupta, 8 months ago

Has patch: set

comment:9 by Mariusz Felisiak, 7 months ago

Patch needs improvement: set

comment:10 by Mahesh Gupta, 7 months ago

As per https://docs.oracle.com/en/error-help/db/ora-43923/ Collation are divided into groups and
Group 1: BINARY, USING_NLS_COMP, USING_NLS_SORT, USING_NLS_SORT_CS, USING_NLS_SORT_VAR1, and USING_NLS_SORT_VAR1_CS
Group 2: BINARY_CI, USING_NLS_SORT_CI, and USING_NLS_SORT_VAR1_CI
Group 3: BINARY_AI, USING_NLS_SORT_AI, and USING_NLS_SORT_VAR1_AI
and action suggested by Oracle is
When modifying the column collation, specify a new collation that is in the same group as the current column collation. If there is no current collation, because you changed the column data type at the same time and the old data type is not a character data type, then select a collation from Group 1 as the new collation.

Reading this, should we really fix this or this is more of a user error and they should act accordingly?

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