mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 20:32:11 +00:00
16 lines
531 B
C#
16 lines
531 B
C#
using System.Diagnostics.CodeAnalysis;
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace AIStudio.Tools.Databases.EmbeddingState;
|
|
|
|
internal static class EmbeddingStateSchemaMigrator
|
|
{
|
|
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(Migrations.InitialRagIndex))]
|
|
public static async Task MigrateAsync(EmbeddingStateDbContext context, CancellationToken token)
|
|
{
|
|
await context.Database.MigrateAsync(token);
|
|
await context.Database.ExecuteSqlRawAsync("PRAGMA journal_mode=WAL;", token);
|
|
}
|
|
}
|