summaryrefslogtreecommitdiff
path: root/docs/ref/django-admin.txt
diff options
context:
space:
mode:
authorMarkus Holtermann <info@markusholtermann.eu>2015-02-12 12:48:28 +0100
committerMarkus Holtermann <info@markusholtermann.eu>2015-02-13 14:29:59 +0100
commitf287bec5833d75750fa6368bc2802741b7924533 (patch)
tree9ab7db3bc9a1834ead7366c0062b9fb39f457648 /docs/ref/django-admin.txt
parentb4e1090ab28c0e731157a61a91a6875bad392307 (diff)
Fixed #24184 -- Prevented automatic soft-apply of migrations
Previously Django only checked for the table name in CreateModel operations in initial migrations and faked the migration automatically. This led to various errors and unexpected behavior. The newly introduced --fake-initial flag to the migrate command must be passed to get the same behavior again. With this change Django will bail out in with a "duplicate relation / table" error instead. Thanks Carl Meyer and Tim Graham for the documentation update, report and review.
Diffstat (limited to 'docs/ref/django-admin.txt')
-rw-r--r--docs/ref/django-admin.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index ce3a78f915..fedec7aefa 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -721,6 +721,19 @@ be warned that using ``--fake`` runs the risk of putting the migration state
table into a state where manual recovery will be needed to make migrations
run correctly.
+.. versionadded:: 1.8
+
+.. django-admin-option:: --fake-initial
+
+The ``--fake-initial`` option can be used to allow Django to skip an app's
+initial migration if all database tables with the names of all models created
+by all :class:`~django.db.migrations.operations.CreateModel` operations in that
+migration already exist. This option is intended for use when first running
+migrations against a database that preexisted the use of migrations. This
+option does not, however, check for matching database schema beyond matching
+table names and so is only safe to use if you are confident that your existing
+schema matches what is recorded in your initial migration.
+
.. deprecated:: 1.8
The ``--list`` option has been moved to the :djadmin:`showmigrations`