# -- models.py --
class Book(models.Model):
name = models.CharField()
class Meta:
db_table = "books"
# -- models.py after renaming model --
class AwesomeBook(models.Model):
name = models.CharField()
class Meta:
db_table = "books"
The migration system ends up making an operational error by trying to
rename the table from `books` to `books`, when the rename is unnecessary.
--
Ticket URL: <https://code.djangoproject.com/ticket/22975>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_docs: => 0
* severity: Normal => Release blocker
* needs_tests: => 0
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/22975#comment:1>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"dcb4ed517082d13ccf7da9bd5d16c77bcecbf139"]:
{{{
#!CommitTicketReference repository=""
revision="dcb4ed517082d13ccf7da9bd5d16c77bcecbf139"
Fixed #22975: Don't call rename SQL if not needed
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22975#comment:2>
Comment (by Andrew Godwin <andrew@…>):
In [changeset:"f57e84392e9aea19f8f9dc31f1e5351de356ce34"]:
{{{
#!CommitTicketReference repository=""
revision="f57e84392e9aea19f8f9dc31f1e5351de356ce34"
[1.7.x] Fixed #22975: Don't call rename SQL if not needed
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22975#comment:3>