Opened 8 years ago

Closed 4 years ago

#26962 closed Cleanup/optimization (fixed)

docs: Missing Information about Transaction in Operations (migrations)

Reported by: Thomas Güttler Owned by: Caio Ariede
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes 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 (8)

comment:1 by Tim Graham, 8 years ago

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 by Jani Tiainen, 8 years ago

Oracle also lacks support of transactions around schema alteration operations.

comment:3 by Caio Ariede, 4 years ago

Owner: changed from nobody to Caio Ariede
Status: newassigned

comment:4 by Caio Ariede, 4 years ago

Has patch: set

comment:5 by Mariusz Felisiak, 4 years ago

Patch needs improvement: set

comment:6 by Mariusz Felisiak, 4 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 9ca22c77:

Fixed #26962 -- Doc'd running migrations in transactions.

comment:8 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 62f6ab2c:

[3.1.x] Fixed #26962 -- Doc'd running migrations in transactions.

Backport of 9ca22c7733efeeb140b75585c6387ef2cb861d19 from master

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