fix(data): enable foreign_keys pragma in MigrateAndConfigure
This commit is contained in:
@@ -45,6 +45,13 @@ public class ClaudeDoDbContext : DbContext
|
||||
walCmd.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
// Enable FK enforcement — SQLite defaults to OFF per connection.
|
||||
using (var fkCmd = conn.CreateCommand())
|
||||
{
|
||||
fkCmd.CommandText = "PRAGMA foreign_keys=ON;";
|
||||
fkCmd.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
// If the 'lists' table exists but __EFMigrationsHistory does not,
|
||||
// this is a pre-EF database. Baseline the InitialCreate migration.
|
||||
using (var cmd = conn.CreateCommand())
|
||||
|
||||
Reference in New Issue
Block a user