fix(db): update migration and configure many-to-many relationships to avoid cascade paths
- Regenerated InitialCreate migration to reflect new entity configurations - Configured many-to-many relationship between CostCycle and Unit with NoAction on Unit side to prevent multiple cascade paths - Updated UnitCost relationships: Cascade from CostCycle, NoAction from Unit - Removed commented-out global filter code and replaced with explicit relationship configurations
This commit is contained in:
@@ -200,8 +200,8 @@ using (var scope = app.Services.CreateScope())
|
||||
"BEGIN " +
|
||||
"CREATE TABLE [__EFMigrationsHistory] ([MigrationId] nvarchar(150) NOT NULL, [ProductVersion] nvarchar(32) NOT NULL, PRIMARY KEY ([MigrationId])); " +
|
||||
"END " +
|
||||
"IF NOT EXISTS (SELECT * FROM __EFMigrationsHistory WHERE MigrationId = '20260608224155_InitialCreate') " +
|
||||
"INSERT INTO __EFMigrationsHistory (MigrationId, ProductVersion) VALUES ('20260608224155_InitialCreate', '6.0.3')");
|
||||
"IF NOT EXISTS (SELECT * FROM __EFMigrationsHistory WHERE MigrationId = '20260608225159_InitialCreate') " +
|
||||
"INSERT INTO __EFMigrationsHistory (MigrationId, ProductVersion) VALUES ('20260608225159_InitialCreate', '6.0.3')");
|
||||
}
|
||||
}
|
||||
catch
|
||||
|
||||
Reference in New Issue
Block a user