`showmigrations` is preferred to `migrate` for this purpose so a typo
doesn't accidentally run the migrations but I suppose that isn't super
important
One currently needs to parse output. It seems like this would be
universally useful
--
Ticket URL: <https://code.djangoproject.com/ticket/31402>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => wontfix
* type: Uncategorized => New feature
* component: Uncategorized => Core (Management commands)
Comment:
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/31402#comment:1>
* stage: Unreviewed => Accepted
Old description:
> It would be helpful if there was a flag for `showmigrations` that acted
> similar to `makemigrations --check` that could be used to stop CI from
> deploying an application automatically when database migrations would be
> needed.
>
> `showmigrations` is preferred to `migrate` for this purpose so a typo
> doesn't accidentally run the migrations but I suppose that isn't super
> important
>
> One currently needs to parse output. It seems like this would be
> universally useful
New description:
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.
One currently needs to parse output. It seems like this would be
universally useful.
--
Comment:
Based on short discussion https://groups.google.com/d/msg/django-
developers/wr8MYU-d8pU/f86jYOZ6AQAJ.
--
Ticket URL: <https://code.djangoproject.com/ticket/31402#comment:2>
* status: closed => new
* resolution: wontfix =>
Old description:
> 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.
>
> One currently needs to parse output. It seems like this would be
> universally useful.
New description:
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.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31402#comment:3>
* has_patch: 0 => 1
Comment:
I opened PR https://github.com/django/django/pull/12630
--
Ticket URL: <https://code.djangoproject.com/ticket/31402#comment:4>
* needs_better_patch: 0 => 1
Comment:
Please don't mark WIP PRs as ready for review.
--
Ticket URL: <https://code.djangoproject.com/ticket/31402#comment:5>
Comment (by thenewguy):
Replying to [comment:5 felixxm]:
> Please don't mark WIP PRs as ready for review.
My mistake. The failing test seems unrelated. Any suggestions?
--
Ticket URL: <https://code.djangoproject.com/ticket/31402#comment:6>
* owner: nobody => thenewguy
* needs_better_patch: 1 => 0
* version: 3.0 => master
* status: new => assigned
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/31402#comment:7>
* cc: Simon Charette (added)
* stage: Ready for checkin => Accepted
Comment:
Please don't mark your own patch as ''Ready for checkin''', checking ''Has
patch'' is sufficient to appear in the review queue.
--
Ticket URL: <https://code.djangoproject.com/ticket/31402#comment:8>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"d0da2820cab495c35eac10680213f927be8b91b0" d0da2820]:
{{{
#!CommitTicketReference repository=""
revision="d0da2820cab495c35eac10680213f927be8b91b0"
Fixed #31402 -- Added migrate --check option.
Command exits with non-zero status if unapplied migrations exist.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31402#comment:8>