Update CodeFirst IndexName

This commit is contained in:
sunkaixuan
2023-10-11 17:27:54 +08:00
parent 65323f0b44
commit 96b94bba0a

View File

@@ -344,6 +344,14 @@ namespace SqlSugar
include=Regex.Match( item.IndexName,@"\{include\:.+$").Value;
item.IndexName = item.IndexName.Replace(include, "");
}
if (item.IndexName.Contains("."))
{
item.IndexName = item.IndexName.Replace(",","_");
if (item.IndexName.Contains("["))
{
item.IndexName = item.IndexName.Replace("[", "").Replace("]", "");
}
}
}
if (!this.Context.DbMaintenance.IsAnyIndex(item.IndexName))
{