1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #30031 -- Added --no-header option to makemigrations/squashmigrations.

This commit is contained in:
Dakota Hawkins
2018-12-19 06:41:31 -05:00
committed by Carlton Gibson
parent b514dc14f4
commit 8d3147e130
6 changed files with 58 additions and 19 deletions

View File

@@ -776,6 +776,12 @@ Enables fixing of migration conflicts.
Allows naming the generated migration(s) instead of using a generated name. The
name must be a valid Python :ref:`identifier <python:identifiers>`.
.. django-admin-option:: --no-header
.. versionadded:: 2.2
Generate migration files without Django version and timestamp header.
.. django-admin-option:: --check
Makes ``makemigrations`` exit with a non-zero status when model changes without
@@ -1156,6 +1162,12 @@ Suppresses all user prompts.
Sets the name of the squashed migration. When omitted, the name is based on the
first and last migration, with ``_squashed_`` in between.
.. django-admin-option:: --no-header
.. versionadded:: 2.2
Generate squashed migration file without Django version and timestamp header.
``startapp``
------------

View File

@@ -194,6 +194,10 @@ Management Commands
* On Oracle, :djadmin:`dbshell` is wrapped with ``rlwrap``, if available.
``rlwrap`` provides a command history and editing of keyboard input.
* The new :option:`makemigrations --no-header` option avoids writing header
comments in generated migration file(s). This option is also available for
:djadmin:`squashmigrations`.
Migrations
~~~~~~~~~~