mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-15 15:13:48 +00:00
15 lines
531 B
C#
15 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);
|
||
|
|
}
|
||
|
|
}
|