From d0da2820cab495c35eac10680213f927be8b91b0 Mon Sep 17 00:00:00 2001 From: Gordon Pendleton Date: Thu, 26 Mar 2020 05:08:58 -0400 Subject: Fixed #31402 -- Added migrate --check option. Command exits with non-zero status if unapplied migrations exist. --- docs/ref/django-admin.txt | 7 +++++++ docs/releases/3.1.txt | 3 +++ 2 files changed, 10 insertions(+) (limited to 'docs') diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 56358b4ef8..4011da32fc 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -865,6 +865,13 @@ with hundreds of models. Suppresses all user prompts. An example prompt is asking about removing stale content types. +.. django-admin-option:: --check + +.. versionadded:: 3.1 + +Makes ``migrate`` exit with a non-zero status when unapplied migrations are +detected. + ``runserver`` ------------- diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt index 6cbdac4a1e..ecd70feb2e 100644 --- a/docs/releases/3.1.txt +++ b/docs/releases/3.1.txt @@ -300,6 +300,9 @@ Management Commands enabled for all configured :setting:`DATABASES` by passing the ``database`` tag to the command. +* The new :option:`migrate --check` option makes the command exit with a + non-zero status when unapplied migrations are detected. + Migrations ~~~~~~~~~~ -- cgit v1.3