Opened 4 years ago

Closed 4 years ago

#31645 closed Cleanup/optimization (fixed)

Models have changes red alert message should say which apps/models

Reported by: John Vandenberg Owned by: Chinmoy
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: Keryn Knight Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When running 'migrate', the message appearing when there are missing migrations should say which app/model it detected has missing migrations.

The message is currently:

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.

Attachments (1)

mod_out.png (146.6 KB ) - added by Chinmoy 4 years ago.
Test output of pending migrations

Download all attachments as: .zip

Change History (15)

comment:1 by Keryn Knight, 4 years ago

Cc: Keryn Knight added
Triage Stage: UnreviewedAccepted

Tentatively marking this as accepted (if it's not too invasive to surface) because there's prior acceptance for similar in #25855.

comment:2 by Mariusz Felisiak, 4 years ago

Component: UncategorizedMigrations
Type: UncategorizedCleanup/optimization
Version: 3.0master

comment:3 by Chinmoy, 4 years ago

Hey I'm a beginner in opensource and would like to work on this issue. May I claim the ticket ?

comment:4 by Mariusz Felisiak, 4 years ago

Feel-free.

comment:5 by Chinmoy, 4 years ago

Owner: changed from nobody to Chinmoy
Status: newassigned

comment:6 by Chinmoy, 4 years ago

What would be an appropriate message here? Will simply printing out the changes dict work?

comment:7 by Chinmoy, 4 years ago

I think a message similar to that given by makemigrations --dry-run would be good enough?

by Chinmoy, 4 years ago

Attachment: mod_out.png added

Test output of pending migrations

comment:8 by Chinmoy, 4 years ago

Will any tests be necessary for this? If yes, what should it test?

comment:9 by Chinmoy, 4 years ago

Submitted a patch PR

Last edited 4 years ago by Chinmoy (previous) (diff)

comment:10 by Chinmoy, 4 years ago

Has patch: set

comment:11 by Chinmoy, 4 years ago

Patch waiting for review. Can someone please review it?

comment:12 by Mariusz Felisiak, 4 years ago

Needs tests: set
Patch needs improvement: set

comment:13 by Mariusz Felisiak, 4 years ago

Needs tests: unset
Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:14 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 2928019e:

Fixed #31645 -- Enhanced the migration warning for migrate commmand.

Added the list of apps with changes not reflected in migrations.

Note: See TracTickets for help on using tickets.
Back to Top