django-admin squashmigrations <app_label> [start_migration_name] <migration_name>
Squashes an existing set of migrations (from first until specified) into a single new one
Arguments
Name | Description |
---|
app_label | App label of the application to squash migrations for |
start_migration_name | Migrations will be squashed starting from and including this migration |
migration_name | Migrations will be squashed until and including this migration |
Options
Name | Description |
---|
--no-optimize | Do not try to optimize the squashed operations |
--noinput, --no-input | Tells Django to NOT prompt the user for input of any kind |
--squashed-name <SQUASHED_NAME> | Sets the name of the new squashed migration |
--no-header | Do not add a header comment to the new squashed migration |
--skip-checks | Skip system checks |
-h, --help | Show this help message and exit |
--version | Show program's version number and exit |
-v, --verbosity <{0,1,2,3}> | Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output |
--settings <SETTINGS> | The Python path to a settings module, e.g. "myproject.settings.main". If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used |
--pythonpath <PYTHONPATH> | A directory to add to the Python path, e.g. "/home/djangoprojects/myproject" |
--traceback | Raise on CommandError exceptions |
--no-color | Don't colorize the command output |
--force-color | Force colorization of the command output |