Management commands for creating and applying zero migrations.
Project description
django-zero-migrations-commands
Provides a zeromigrations management-command that creates and applies zero migrations
Quick start
- Install with
pip install django-zero-migrations-commands - Add
"django_zero_migrations_commands"to yourINSTALLED_APPSsetting like this:INSTALLED_APPS = [ # ... "django_zero_migrations_commands", ]
- (Optional) Change the settings described in the next section in your
settings.py - Create zero migrations using
python manage.py zeromigrations create - Apply them on other systems using
python manage.py zeromigrations apply
Available settings
ZERO_MIGRATIONS_APPS: Optional[list[str]] = None
"""The apps to reset migrations for. default: `None`.
Will reset migrations for all local apps if `None`."""
ZERO_MIGRATIONS_ALLOW_CREATE_DEBUG_FALSE: bool = False
"""Whether the create action can be run in `DEBUG = False` mode. default: `False`"""
ZERO_MIGRATIONS_CONFIRM_CREATE_DEBUG_FALSE: bool = False
"""Whether to ask for confirmation before running the create action in `DEBUG = False` mode.
default: `False`"""
ZERO_MIGRATIONS_ALLOW_APPLY_DEBUG_FALSE: bool = True
"""Whether the apply action can be run in `DEBUG = False` mode. default: `True`"""
ZERO_MIGRATIONS_CONFIRM_APPLY_DEBUG_FALSE: bool = True
"""Whether to ask for confirmation before running the apply action in `DEBUG = False` mode.
default: `True`"""
What it does
createremoves the migrations of your apps and replaces them by a new initial migration. Resets your migration history to this migration.applyis used to reset the migration history on other instances after receiving the new migrations by other means (i.e. version control)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_zero_migrations_commands-1.0.2.tar.gz.
File metadata
- Download URL: django_zero_migrations_commands-1.0.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2eb87ebbfe43e0c54b191d241b05970d2472eb5afe002be50e51f54e07763b4
|
|
| MD5 |
621690653ba9308427c759b4145c381c
|
|
| BLAKE2b-256 |
b52ef10c9c8d5928a0bbcd67c0de44db3ffeb7e992b702c46b1f06fd348ffe82
|
File details
Details for the file django_zero_migrations_commands-1.0.2-py3-none-any.whl.
File metadata
- Download URL: django_zero_migrations_commands-1.0.2-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dccd3e02476e7b6932cf518ef833bdd3bbfbd774bdadcc50ae1682025addbdfe
|
|
| MD5 |
d8c383fd2d96e741563de9426ab51f70
|
|
| BLAKE2b-256 |
80ae3bd741db2625df298de0b69bd2e3bf3ceb30f7b4df0f1f8dc4736bee8e36
|