Skip to main content

django-zero-migrations-commands

Provides a zeromigrations management-command that creates and applies zero migrations

Quick start

  1. Install with pip install django-zero-migrations-commands
  2. Add "django_zero_migrations_commands" to your INSTALLED_APPS setting like this:
    INSTALLED_APPS = [
        # ...
        "django_zero_migrations_commands",
    ]
    
  3. (Optional) Change the settings described in the next section in your settings.py
  4. Create zero migrations using python manage.py zeromigrations create
  5. 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`"""

ZERO_MIGRATIONS_BEFORE_CREATE_HOOK: Optional[Callable[[], None]] = None
"""The hook to run before creating new migrations. default: `None`."""

What it does

  • create removes the migrations of your apps and replaces them by a new initial migration.
  • apply resets the migration history after creating or receiving the new migrations by other means (i.e. version control)

Metadata

Release files for django-zero-migrations-commands 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-zero-migrations-commands 1.1.0
File Size Uploaded
django_zero_migrations_commands-1.1.0.tar.gz 46.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-zero-migrations-commands 1.1.0
File Interpreter ABI Platform
django_zero_migrations_commands-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 51.8 kB

Release files / django_zero_migrations_commands-1.1.0.tar.gz

Download URL django_zero_migrations_commands-1.1.0.tar.gz
Size 46.2 kB
Tags Source
SHA-256 checksum
How to use checksums
afa4bde4e0bb964e280cf7efcc8d2492958bcc73f181bca78cb295c43fd23957
BLAKE2b-256 checksum
How to use checksums
606af79d8926ec9c5366b62cb2c8c19a8f964f3a90cf99e707aa97e3a01b7f3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / django_zero_migrations_commands-1.1.0-py3-none-any.whl

Download URL django_zero_migrations_commands-1.1.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d7e2127e5c5ad1641801ae8c585867dcf0ccd330894b6ee11e13d30ab6cd8e1
BLAKE2b-256 checksum
How to use checksums
fef2145e10ccd0e234332902b3a87b02b8ac128b1964b1f953c02f67e59a867f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page