﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
25833	Non-atomic migrations	Ludwig Hähne	nobody	"Database transactions are always wrapped in transactions (on DBs that support transactional DDL like Postgres). Generally this is a good idea.

However, one can't do batched updates in data migrations which is essential for performing changes on big tables on a live DB:

http://pankrat.github.io/2015/django-migrations-without-downtimes/

It's also not possible to create indexes concurrently on Postgres from inside a transaction.

Therefore, I'd like to have support for non-atomic migrations in Django because it's pretty messy to work around not having proper support for that:

http://stackoverflow.com/questions/31247810/commit-manually-in-django-data-migration

I propose exempting specific migrations from being wrapped in a transaction by setting `atomic = False` on the migration:

https://github.com/django/django/compare/master...Ableton:non-atomic-migrations

This was already discussed on the Django developers mailing list:

https://groups.google.com/forum/#!topic/django-developers/aAYiyAqTlUc

I'll open a pull request for this new feature in a bit."	New feature	new	Migrations	dev	Normal				Unreviewed	1	0	0	0	0	0
