Skip to content

Atomic migrations by default in SQLite #3136

Description

@ColonelThirtyTwo

Motivation

#2980 added support for running migrations atomically inside of a transaction, but only enabled it for PostgreSQL. SQLite can also run DDL statements inside of transactions and roll them back, so atomic migrations should be used for it as well by default.

Proposed Solutions

Extend the check for PostgreSQL to check for SQLite as well.

Additional Information

The PR added a way to force using a transaction using fn use_transaction(&self) -> Option<bool> { Some(true) } but it's boilerplate-y.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions