Opened 4 years ago

Closed 4 years ago

#31402 closed New feature (fixed)

Add --check flag to migrate.

Reported by: nickname123 Owned by: thenewguy
Component: Core (Management commands) Version: dev
Severity: Normal Keywords:
Cc: 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 (last modified by thenewguy)

It would be helpful if there was a flag for migrate that acted similar to makemigrations --check that could be used to stop CI from deploying an application automatically when unapplied migrations exist.

This is different from makemigrations --check because the new command flag would tell us if we need to *run* any migrations where as makemigrations --check tells us if we need to *create* any migrations.

One currently needs to parse output. It seems like this would be universally useful.

Change History (8)

comment:1 by Mariusz Felisiak, 4 years ago

Component: UncategorizedCore (Management commands)
Resolution: wontfix
Status: newclosed
Summary: Add --check flag to showmigrationsAdd --check flag to showmigrations.
Type: UncategorizedNew feature

Thanks for this ticket, however I don't see why you cannot use makemigrations --check for the same purpose. You can start a discussion on DevelopersMailingList if you don't agree.

comment:2 by Mariusz Felisiak, 4 years ago

Description: modified (diff)
Summary: Add --check flag to showmigrations.Add --check flag to migrate.
Triage Stage: UnreviewedAccepted

comment:3 by thenewguy, 4 years ago

Description: modified (diff)
Resolution: wontfix
Status: closednew

comment:4 by thenewguy, 4 years ago

Has patch: set

comment:5 by Mariusz Felisiak, 4 years ago

Patch needs improvement: set

Please don't mark WIP PRs as ready for review.

in reply to:  5 comment:6 by thenewguy, 4 years ago

Replying to felixxm:

Please don't mark WIP PRs as ready for review.

My mistake. The failing test seems unrelated. Any suggestions?

comment:7 by Mariusz Felisiak, 4 years ago

Owner: changed from nobody to thenewguy
Patch needs improvement: unset
Status: newassigned
Triage Stage: AcceptedReady for checkin
Version: 3.0master

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

Resolution: fixed
Status: assignedclosed

In d0da2820:

Fixed #31402 -- Added migrate --check option.

Command exits with non-zero status if unapplied migrations exist.

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