修改查询
This commit is contained in:
@@ -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语句
|
||||
|
||||
Reference in New Issue
Block a user