Opened 22 months ago

Last modified 22 months ago

#26962 new Cleanup/optimization

docs: Missing Information about Transaction in Operations (migrations)

Reported by: Thomas Güttler Owned by: nobody
Component: Documentation Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I could not find a note how the migrations operations (for example CreateModel) handle transactions.

I checked these pages:

https://docs.djangoproject.com/en/dev/topics/migrations/
https://docs.djangoproject.com/en/dev/ref/migration-operations/

There are some notes about how RunPython handles transactions, but not the general handling of transactions.

The question which I want to see answered in the docs:

Do migrations operations create a new transaction by default, or do all migrations operations run in one transaction?

Please forgive me, if I was blind.

Change History (2)

comment:1 Changed 22 months ago by Tim Graham

Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

Yes, this isn't stated clearly. There's a hint about it in the MySQL section of the topic guide, "MySQL lacks support for transactions around schema alteration operations" and some discussion in the writing migrations how-to, but it should be more clear in general.

comment:2 Changed 22 months ago by Jani Tiainen

Oracle also lacks support of transactions around schema alteration operations.

Note: See TracTickets for help on using tickets.
Back to Top