Skip to content

Document transaction behaviour of migrations #4855

@GamerBene19

Description

@GamerBene19

Rust Version

1.90.0

Diesel Version

2.3.2

Diesel Features

"postgres", "postgres_backend", "uuid", "chrono", "r2d2", "numeric"

Database Version

PostgreSQL 17.4

Operating System Version

Arch Linux

What happened?

The current behavior about if/when migrations are run inside transactions is not documented.
From a search through the code it seems like they run in transactions by default, but there might be cases where that default is not used.

What did you expect to happen?

It would be nice if the behavior about if/when migrations are run inside transactions would be documented on https://docs.rs/diesel_migrations/latest/diesel_migrations/ and/or https://diesel.rs/guides/getting-started

Additional details

For more details see: #4854

Steps to reproduce

Compile time error

No response

Checklist

  • I have already looked over the issue tracker and the discussion forum for similar possible closed issues.

  • This issue can be reproduced on Rust's stable channel. (Please submit the issue in the Rust issue tracker instead if that's not the case)

  • This issue can be reproduced without requiring a third party crate

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions