mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-19 08:39:44 +00:00
fix(sqlite) Migrate revert with no-transaction (#4024)
* Fix migration reverts for no-TX SQLite * Add regression test --------- Co-authored-by: Markus Gasser <markus.gasser@frauscher.com>
This commit is contained in:
@@ -207,7 +207,7 @@ CREATE TABLE IF NOT EXISTS {table_name} (
|
||||
let start = Instant::now();
|
||||
|
||||
if migration.no_tx {
|
||||
execute_migration(self, table_name, migration).await?;
|
||||
revert_migration(self, table_name, migration).await?;
|
||||
} else {
|
||||
// Use a single transaction for the actual migration script and the essential bookkeeping so we never
|
||||
// execute migrations twice. See https://github.com/launchbadge/sqlx/issues/1966.
|
||||
|
||||
Reference in New Issue
Block a user