[Django] #24715: Django Migration's alter_db_table does not rename sequences and triggers.

10 views
Skip to first unread message

Django

unread,
Apr 27, 2015, 11:33:33 AM4/27/15
to django-...@googlegroups.com
#24715: Django Migration's alter_db_table does not rename sequences and triggers.
-----------------------------+--------------------------------------------
Reporter: johnrtipton | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Keywords: migrations oracle rename table
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------------
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

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

Django

unread,
Apr 27, 2015, 11:34:11 AM4/27/15
to django-...@googlegroups.com
#24715: Django Migration's alter_db_table does not rename sequences and triggers.
-------------------------------------+-------------------------------------

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

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

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


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

Django

unread,
Apr 28, 2015, 7:54:46 AM4/28/15
to django-...@googlegroups.com
#24715: Django Migration's alter_db_table does not rename sequences and triggers.
-------------------------------------+-------------------------------------

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

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

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

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

Django

unread,
Apr 28, 2015, 5:45:07 PM4/28/15
to django-...@googlegroups.com
#24715: Django Migration's alter_db_table does not rename sequences and triggers.
-------------------------------------+-------------------------------------

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

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

* cc: shaib (added)


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

Django

unread,
Apr 29, 2015, 9:30:03 AM4/29/15
to django-...@googlegroups.com
#24715: Django Migration's alter_db_table does not rename sequences and triggers.
-------------------------------------+-------------------------------------

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

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by johnrtipton):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/24715#comment:4>

Django

unread,
Apr 29, 2015, 10:46:20 AM4/29/15
to django-...@googlegroups.com
#24715: Django Migration's alter_db_table does not rename sequences and triggers.
-------------------------------------+-------------------------------------

Reporter: johnrtipton | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Release blocker | Resolution:
Keywords: migrations oracle | Triage Stage: Accepted
rename table |

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

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

* version: master => 1.7
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/24715#comment:5>

Django

unread,
Jul 2, 2015, 10:43:53 AM7/2/15
to django-...@googlegroups.com
#24715: Migration's alter_db_table does not rename Oracle sequences and triggers.
-------------------------------------+-------------------------------------

Reporter: johnrtipton | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Release blocker | Resolution:
Keywords: migrations oracle | Triage Stage: Accepted
rename table |
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

--
Ticket URL: <https://code.djangoproject.com/ticket/24715#comment:6>

Django

unread,
Aug 24, 2015, 1:34:21 PM8/24/15
to django-...@googlegroups.com
#24715: Migration's alter_db_table does not rename Oracle sequences and triggers.
-------------------------------------+-------------------------------------
Reporter: johnrtipton | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Normal | Resolution:

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

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

* severity: Release blocker => Normal


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/24715#comment:7>

Django

unread,
May 25, 2016, 3:24:59 AM5/25/16
to django-...@googlegroups.com
#24715: Migration's alter_db_table does not rename Oracle sequences and triggers.
-------------------------------------+-------------------------------------
Reporter: johnrtipton | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 1.7
Severity: Normal | Resolution: duplicate

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

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

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


Comment:

It's the same underlying issue as #23577.

--
Ticket URL: <https://code.djangoproject.com/ticket/24715#comment:8>

Reply all
Reply to author
Forward
0 new messages