Opened 9 years ago

Closed 8 years ago

#24715 closed Bug (duplicate)

Migration's alter_db_table does not rename Oracle sequences and triggers.

Reported by: John R. Tipton Owned by: nobody
Component: Migrations Version: 1.7
Severity: Normal Keywords: migrations oracle rename table
Cc: Shai Berger Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Django Migration's alter_db_table does not rename sequences and triggers. This causes problems after renaming a table with the Django Migration.

I've written a patch to change the sequences and triggers when an Oracle table is renamed with alter_db_table.

See pull request:
https://github.com/django/django/pull/4567

Change History (8)

comment:1 by John R. Tipton, 9 years ago

Has patch: set
Needs tests: set

comment:2 by Tim Graham, 9 years ago

What problems does it cause? (Trying to determine if the fix should be backported to 1.7 and/or 1.8).

comment:3 by Shai Berger, 9 years ago

Cc: Shai Berger added

comment:4 by John R. Tipton, 9 years ago

Yes, it should be backported to 1.7 and added to 1.8. I've backported it into my 1.7.7 branch.

When you use migrations.RenameModel in a migration, it does not rename sequences or triggers. This prevents the tables autonumber from working and causes orphaned triggers and sequences.

comment:5 by Tim Graham, 9 years ago

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted
Version: master1.7

Very well, we are just awaiting tests and a mention in the 1.8.1 and 1.7.8 release notes then.

comment:6 by Tim Graham, 9 years ago

Summary: Django Migration's alter_db_table does not rename sequences and triggers.Migration's alter_db_table does not rename Oracle sequences and triggers.

comment:7 by Tim Graham, 9 years ago

Severity: Release blockerNormal

While this issue remains a candidate for backport, I suppose we should demote it from "release blocker" as it's not blocking any releases.

comment:8 by Simon Charette, 8 years ago

Resolution: duplicate
Status: newclosed

It's the same underlying issue as #23577.

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