Opened 10 years ago
Closed 10 years ago
#24412 closed New feature (duplicate)
Red migration notice should be printed when running tests without --verbosity=2
Reported by: | Peter Schmidt | Owned by: | nobody |
---|---|---|---|
Component: | Migrations | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
The following quite useful red NOTICE is printed to the command line only when running manage.py test --verbosity=2 --keepdb
(the second time after no migrations are run), and thus buried amongst a lot of other information:
https://github.com/django/django/blob/master/django/core/management/commands/migrate.py#L183-191
Your models have changes that are not yet reflected in a migration, and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
I think it should be printed at the default manage.py test
(i.e. --verbosity=1
).
This might be complicated by decrementing the verbosity by 1 when calling migrate
inside create_test_db
:
https://github.com/django/django/blob/master/django/db/backends/base/creation.py#L68
Though there are only 16 verbosity strings in migrate.py
(including calls to showmigrations and emit_pre_migrate_signal) so the side effects from that part should be reasonably traceable.
Not sure about not printing the first time (i.e. without --keepdb
) ... any thoughts?
Change History (4)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|
comment:2 by , 10 years ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Type: | Uncategorized → New feature |
Version: | 1.8alpha1 → master |
comment:3 by , 10 years ago
Thanks Markus, it is consistent with the 1.8 roadmap and the workaround is to watch closely --verbosity=2 --keepdb
https://code.djangoproject.com/wiki/Version1.8Roadmap
comment:4 by , 10 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
This will be fixed by #24484
We don't accept any feature requests for 1.8 anymore, but I accepted it for the next version.