SeaQL / SeaQL/sea-orm

Atomic migrations by default in SQLite

Open Beginner friendly
#3,136 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
9.9k
Forks
734
Avg merge
6h 36m
Merged PRs (30d)
8

Description

Motivation

https://github.com/SeaQL/sea-orm/pull/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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the PostgreSQL transaction eligibility check introduced by PR 2980 and inspect the surrounding migration logic and SQLite tests. Extend the default behavior to SQLite, then verify that SQLite migrations run atomically and roll back on failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sqlite
Domain
databases
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.