Closed
Bug 1328297
Opened 9 years ago
Closed 8 years ago
Enable migrations checks for custom management commands once on Django 1.10
Categories
(Tree Management :: Treeherder, defect, P3)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: emorley, Unassigned)
References
Details
Django 1.10 added the ability for custom management commands to opt into migrations checks:
https://code.djangoproject.com/ticket/25304
https://github.com/django/django/commit/50931dfa5310d5ae1c6e2852d05bf1e86700827f
These checks output a warning when the management command is run, if there are outstanding unapplied migrations at that time (but doesn't stop them running). This can make any subsequent errors (in case of eg a new table having not been created) less confusing.
To enable these for our custom commands, we just need to add this to the command class:
requires_migrations_checks = True
See:
https://docs.djangoproject.com/en/1.10/howto/custom-management-commands/#django.core.management.BaseCommand.requires_migrations_checks
| Reporter | ||
Updated•8 years ago
|
Component: Treeherder → Treeherder: Docs & Development
| Reporter | ||
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
| Assignee | ||
Updated•4 years ago
|
Component: Treeherder: Docs & Development → TreeHerder
You need to log in
before you can comment on or make changes to this bug.
Description
•