Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
34f5978aea
|
|
@ -73,7 +73,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
if (inQuery.Id == null && inQuery.VisitTaskId == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException("Id 或者VisitTaskId 必传一个");
|
||||
throw new BusinessValidationFailedException("The interface parameter Id or VisitTaskId cannot be passed at the same time");
|
||||
}
|
||||
|
||||
var result = await _userFeedBackRepository
|
||||
|
|
|
|||
|
|
@ -61,23 +61,51 @@ public class NoForeignKeyMigrationsSqlGenerator : SqlServerMigrationsSqlGenerato
|
|||
//}
|
||||
|
||||
// 检查是否是外键索引
|
||||
var table = model?.FindEntityType(operation.Table);
|
||||
if (table != null)
|
||||
{
|
||||
foreach (var foreignKey in table.GetForeignKeys())
|
||||
{
|
||||
// 如果索引列和外键列相同,跳过生成
|
||||
if (operation.Columns.SequenceEqual(foreignKey.Properties.Select(p => p.Name)))
|
||||
{
|
||||
return; // 跳过生成外键索引
|
||||
}
|
||||
}
|
||||
}
|
||||
//var table = model?.FindEntityType(operation.Table);
|
||||
//if (table != null)
|
||||
//{
|
||||
// foreach (var foreignKey in table.GetForeignKeys())
|
||||
// {
|
||||
// // 如果索引列和外键列相同,跳过生成
|
||||
// if (operation.Columns.SequenceEqual(foreignKey.Properties.Select(p => p.Name)))
|
||||
// {
|
||||
// return; // 跳过生成外键索引
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
if (IsForeignKeyIndex(operation, model))
|
||||
return;
|
||||
|
||||
// 非外键索引,调用基类方法正常生成
|
||||
base.Generate(operation, model, builder, terminate);
|
||||
}
|
||||
private bool IsForeignKeyIndex(CreateIndexOperation operation, IModel? model)
|
||||
{
|
||||
var entity = model?
|
||||
.GetEntityTypes()
|
||||
.FirstOrDefault(e =>
|
||||
e.GetTableName() == operation.Table &&
|
||||
e.GetSchema() == operation.Schema);
|
||||
|
||||
if (entity == null)
|
||||
return false;
|
||||
|
||||
var tableId = StoreObjectIdentifier.Table(operation.Table, operation.Schema);
|
||||
|
||||
foreach (var fk in entity.GetForeignKeys())
|
||||
{
|
||||
var cols = fk.Properties
|
||||
.Select(p => p.GetColumnName(tableId))
|
||||
.ToArray();
|
||||
|
||||
if (cols.SequenceEqual(operation.Columns))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ public class IRaCISDBContext : DbContext
|
|||
configurationBuilder.Conventions.Remove(typeof(ForeignKeyIndexConvention));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
|
|
|
|||
|
|
@ -1,30 +1,4 @@
|
|||
kind: pipeline
|
||||
type: ssh
|
||||
name: ssh-linux-uat-irc-build-image
|
||||
|
||||
platform:
|
||||
os: Linux
|
||||
arch: 386
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
server:
|
||||
host: 101.132.253.119
|
||||
user: root
|
||||
password:
|
||||
from_secret: test_ssh_pwd
|
||||
|
||||
steps:
|
||||
- name: build-uat-irc
|
||||
commands:
|
||||
- bash /opt/1panel/xc-deploy-new/Uat_IRC/devops-publish/uat-branch-publish.sh
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- Uat_IRC_Net8
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: ssh
|
||||
name: ssh-linux-test-irc-publish
|
||||
|
|
@ -59,33 +33,6 @@ trigger:
|
|||
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: ssh
|
||||
name: ssh-linux-test-study-publish
|
||||
|
||||
platform:
|
||||
os: Linux
|
||||
arch: 386
|
||||
|
||||
clone:
|
||||
disable: true #禁用默认克隆
|
||||
|
||||
server:
|
||||
host: 106.14.89.110
|
||||
user: root
|
||||
password:
|
||||
from_secret: test_ssh_pwd
|
||||
|
||||
steps:
|
||||
- name: publish-test-study
|
||||
commands:
|
||||
- cd /opt/1panel/xc-deploy/Test_Study/devops-build-publish ; sh pull-build-test-study-image.sh v${DRONE_BUILD_NUMBER}
|
||||
- cd /opt/1panel/xc-deploy/Test_Study ;sh update-image-if-need-then-pull-aliyun.sh v${DRONE_BUILD_NUMBER}
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- Test_Study_Net8
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue