From 5247124f3569388c66758ad49f461c072ae4f786 Mon Sep 17 00:00:00 2001 From: Ivan Shvedunov Date: Sat, 17 Aug 2024 22:24:04 +0400 Subject: [PATCH] sql: fix in-memory db handling Don't check for incomplete migrations in case of an in-memory DB --- sql/database.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/database.go b/sql/database.go index 77f80a5789..0e3ed34ab3 100644 --- a/sql/database.go +++ b/sql/database.go @@ -229,7 +229,7 @@ func Open(uri string, opts ...Opt) (*sqliteDatabase, error) { for _, opt := range opts { opt(config) } - if !config.temp && config.handleIncompleteMigrations { + if !config.temp && config.handleIncompleteMigrations && !config.forceFresh { if err := handleIncompleteCopyMigration(config); err != nil { return nil, err }