修改查询

This commit is contained in:
2024-12-27 11:32:17 +08:00
parent c06681f379
commit 7853614d2d
34 changed files with 237 additions and 165 deletions
@@ -21,6 +21,7 @@ public class NoForeignKeyMigrationsSqlGenerator : SqlServerMigrationsSqlGenerato
protected override void Generate(Microsoft.EntityFrameworkCore.Migrations.Operations.CreateTableOperation operation, IModel? model, MigrationCommandListBuilder builder, bool terminate = true)
{
operation.ForeignKeys.Clear();
base.Generate(operation, model, builder, terminate);
}
protected override void Generate(AddForeignKeyOperation operation, IModel? model, MigrationCommandListBuilder builder, bool terminate = true)
@@ -33,7 +34,8 @@ public class NoForeignKeyMigrationsSqlGenerator : SqlServerMigrationsSqlGenerato
// 忽略所有删除外键的操作
// 不调用 base.Generate 来跳过生成删除外键的SQL
}
////忽略掉唯一约束,因为dicom Id 的问题
////忽略掉唯一约束
//protected override void Generate(CreateIndexOperation operation, IModel? model, MigrationCommandListBuilder builder, bool terminate = true)
//{
// // 如果索引是唯一的,则忽略,不生成SQL语句