#25833: Non-atomic migrations -----------------------------+-------------------- Reporter: Pankrat | Owner: nobody Type: New feature | Status: new Component: Migrations | Version: master Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 1 Easy pickings: 0 | UI/UX: 0 -----------------------------+-------------------- 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 I'll open a pull request for this new feature in a bit. -- Ticket URL: <https://code.djangoproject.com/ticket/25833> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/050.083b7e0dcba590457ac6a2451527c128%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.