chore(data): remove raw ADO.NET infrastructure, add EF migration and design-time factory
Delete SqliteConnectionFactory, SchemaInitializer, and schema.sql. Fix ValueConverter lambdas in entity configurations (no throw-expressions in expression trees). Add IDesignTimeDbContextFactory for dotnet-ef tooling. Generate InitialCreate migration with seed data for agent/manual tags. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
15
src/ClaudeDo.Data/ClaudeDoDbContextFactory.cs
Normal file
15
src/ClaudeDo.Data/ClaudeDoDbContextFactory.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Design;
|
||||
|
||||
namespace ClaudeDo.Data;
|
||||
|
||||
public sealed class ClaudeDoDbContextFactory : IDesignTimeDbContextFactory<ClaudeDoDbContext>
|
||||
{
|
||||
public ClaudeDoDbContext CreateDbContext(string[] args)
|
||||
{
|
||||
var options = new DbContextOptionsBuilder<ClaudeDoDbContext>()
|
||||
.UseSqlite("Data Source=design-time.db")
|
||||
.Options;
|
||||
return new ClaudeDoDbContext(options);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user