Opened 10 years ago
Closed 10 years ago
#23644 closed Cleanup/optimization (wontfix)
Django 1.7: adding order_by to model Meta class causes Django to create a meaningless migration
Reported by: | Rob van der Linde | Owned by: | nobody |
---|---|---|---|
Component: | Migrations | Version: | 1.7 |
Severity: | Normal | Keywords: | migrations |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When you add a Meta class with just an order_by to an existing model, Django 1.7 thinks it needs to create a migration for this change, while this does not change the schema at all and probably shouldn't really require a migration.
South would not create a migration in this case I am pretty sure, it seems Django 1.7 does.
Note:
See TracTickets
for help on using tickets.
Hi,
This is by design, as noted in the last paragraph of https://docs.djangoproject.com/en/1.7/topics/migrations/#the-commands:
Thanks.