mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-01-23 21:32:04 +08:00
Split table rename index
This commit is contained in:
@@ -320,7 +320,14 @@ namespace SqlSugar
|
||||
{
|
||||
if (entityInfo.Type.GetCustomAttribute<SplitTableAttribute>() != null)
|
||||
{
|
||||
item.IndexName = item.IndexName + entityInfo.DbTableName;
|
||||
if (item.IndexName?.Contains("{split_table}") == true)
|
||||
{
|
||||
item.IndexName = item.IndexName.Replace("{split_table}", entityInfo.DbTableName);
|
||||
}
|
||||
else
|
||||
{
|
||||
item.IndexName = item.IndexName + entityInfo.DbTableName;
|
||||
}
|
||||
}
|
||||
if (this.Context.CurrentConnectionConfig.IndexSuffix.HasValue())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user