Moved temporary files into a folder of their own below the data directory (#1245)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-29 18:45:34 +01:00
1 parent ddfc632b63
commit 12d3e1ec6c
52 files changed
+1219 -396

No files matched your search

@@ -7,8 +7,11 @@ internal sealed class IndexStoreDesignTimeDbContextFactory : IDesignTimeDbContex
public IndexStoreDbContext CreateDbContext(string[] args)
{
var databasePath = args.FirstOrDefault(argument => argument.EndsWith(".sqlite3", StringComparison.OrdinalIgnoreCase));
// Only dotnet ef runs this, while it creates a migration, so neither AI Studio nor its data directory is there:
#pragma warning disable MWAIS0019
if (string.IsNullOrWhiteSpace(databasePath))
databasePath = Path.Combine(Path.GetTempPath(), "mindwork-ai-studio-rag-index-design.sqlite3");
#pragma warning restore MWAIS0019
return new IndexStoreDbContext(IndexStoreDbContext.CreateOptions(databasePath));
}
@@ -7,8 +7,11 @@ internal sealed class ProvenanceStoreDesignTimeDbContextFactory : IDesignTimeDbC
public ProvenanceStoreDbContext CreateDbContext(string[] args)
{
var databasePath = args.FirstOrDefault(argument => argument.EndsWith(".sqlite3", StringComparison.OrdinalIgnoreCase));
// Only dotnet ef runs this, while it creates a migration, so neither AI Studio nor its data directory is there:
#pragma warning disable MWAIS0019
if (string.IsNullOrWhiteSpace(databasePath))
databasePath = Path.Combine(Path.GetTempPath(), "mindwork-ai-studio-provenance-design.sqlite3");
#pragma warning restore MWAIS0019
return new ProvenanceStoreDbContext(ProvenanceStoreDbContext.CreateOptions(databasePath));
}