mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 13:11:10 +00:00
Adds the media library scan snapshot, staging and directory fingerprint data model
This commit is contained in:
1 parent
4fec67a1f8
commit
1dc3da3da1
37 files changed
+7315
-89
No files matched your search
@@ -12,6 +12,7 @@ using Lumina.Presentation.Api.Common.DependencyInjection;
|
||||
using Lumina.Presentation.Api.Common.Middlewares;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Data.Sqlite;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
@@ -86,6 +87,15 @@ public class Program
|
||||
{
|
||||
LuminaDbContext context = services.GetRequiredService<LuminaDbContext>();
|
||||
await context.Database.MigrateAsync();
|
||||
|
||||
// enable the Write-Ahead Logging journal mode and a busy timeout, so that the Entity Framework connection and the dedicated connections
|
||||
// used by the bulk data access operations of Dapper can access the database concurrently, without database locking errors
|
||||
SqliteConnection sqliteConnection = new(context.Database.GetDbConnection().ConnectionString);
|
||||
sqliteConnection.Open();
|
||||
using SqliteCommand sqliteCommand = sqliteConnection.CreateCommand();
|
||||
sqliteCommand.CommandText = "PRAGMA journal_mode=WAL; PRAGMA busy_timeout=10000;";
|
||||
sqliteCommand.ExecuteNonQuery();
|
||||
sqliteConnection.Close();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user