事件存储准备

This commit is contained in:
2024-10-10 14:24:56 +08:00
parent 2527d709fa
commit 2c1300acb4
13 changed files with 18205 additions and 12 deletions
@@ -28,4 +28,24 @@ public class NoForeignKeyMigrationsSqlGenerator : SqlServerMigrationsSqlGenerato
}
protected override void Generate(DropForeignKeyOperation operation, IModel? model, MigrationCommandListBuilder builder, bool terminate = true)
{
// 忽略所有删除外键的操作
// 不调用 base.Generate 来跳过生成删除外键的SQL
}
////忽略掉唯一约束,因为dicom Id 的问题
//protected override void Generate(CreateIndexOperation operation, IModel? model, MigrationCommandListBuilder builder, bool terminate = true)
//{
// // 如果索引是唯一的,则忽略,不生成SQL语句
// if (operation.IsUnique)
// {
// return; // 跳过唯一约束的索引创建
// }
// // 如果不是唯一索引,则继续生成
// base.Generate(operation, model, builder, terminate);
//}
}
@@ -1,4 +1,5 @@
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Domain.BaseModel;
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Infra.EFCore.Common;
using IRaCIS.Core.Infrastructure.Encryption;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
@@ -558,7 +559,7 @@ public class IRaCISDBContext : DbContext
public virtual DbSet<TestLength> TestLength { get; set; }
public virtual DbSet<EventStoreRecord> EventStoreRecord { get; set; }