From b72a4fd6b568dc47080419e0ed3da316c96ec8e9 Mon Sep 17 00:00:00 2001 From: nanxun Date: Wed, 29 Apr 2026 21:59:26 +0800 Subject: [PATCH] fix: initialize sqlite provider for migration --- .../LiveRecorder.Infrastructure.csproj | 2 +- .../Persistence/SqliteToPostgresMigrationService.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/LiveRecorder.Infrastructure/LiveRecorder.Infrastructure.csproj b/src/LiveRecorder.Infrastructure/LiveRecorder.Infrastructure.csproj index 4ed7297..1b93be0 100644 --- a/src/LiveRecorder.Infrastructure/LiveRecorder.Infrastructure.csproj +++ b/src/LiveRecorder.Infrastructure/LiveRecorder.Infrastructure.csproj @@ -11,7 +11,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/LiveRecorder.Infrastructure/Persistence/SqliteToPostgresMigrationService.cs b/src/LiveRecorder.Infrastructure/Persistence/SqliteToPostgresMigrationService.cs index debbccf..488d428 100644 --- a/src/LiveRecorder.Infrastructure/Persistence/SqliteToPostgresMigrationService.cs +++ b/src/LiveRecorder.Infrastructure/Persistence/SqliteToPostgresMigrationService.cs @@ -37,6 +37,8 @@ public sealed class SqliteToPostgresMigrationService string sqliteDbPath, CancellationToken cancellationToken = default) { + SQLitePCL.Batteries_V2.Init(); + if (string.IsNullOrWhiteSpace(sqliteDbPath)) { throw new ArgumentException("SQLite database path is required.", nameof(sqliteDbPath));