Update CodeFirst IndexName

This commit is contained in:
sunkaixuan
2023-10-11 17:29:00 +08:00
parent 96b94bba0a
commit 18a25a0e68

View File

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