django-atomic-migrations

Adds unique constraint on Django's migration tracking model


Keywords
atomic, django, migrations, transaction
License
MIT
Install
pip install django-atomic-migrations==0.1.7

Documentation

Django Atomic Migrations

Build Status

This small package ensures that Django's migration tracking model has an unique index for applied migrations, and also ensures that migrations steps are applied in transactions. This is known to work with PostgreSQL.

Usage

Install the package:

$ pip install django-atomic-migrations

Then, add the application to INSTALLED_APPS in your Django project:

INSTALLED_APPS = [
	...
	'django_atomic_migrations.AtomicMigrations',
	...
]

If your project's database already exists, you should run

$ python manage.py add-migrations-constraint

to create the missing unique constraint.