django.db.migrations.operations.base Operation Example Code

Operation is a class within the django.db.migrations.operations.base module of the Django project.

Example 1 from django-migration-linter

django-migration-linter (PyPI package information) checks for backwards-incompatible changes in Django ORM schema migrations and warns you about them. The purpose of the project is to save time in older and larger projects by detecting field migrations that will be a problem so you do not run into issues later, and make it easier to enable continuous deployment configurations with database changes. There is a blog post on keeping Django database migrations backward compatible that goes into further detail on the tool.

The django-migration-linter project is open sourced under the Apache 2.0 license.

django-migration-linter / django_migration_linter / operations.py