Update core

This commit is contained in:
sunkaixuan
2022-04-14 15:31:07 +08:00
parent 68a1710ff5
commit dc0bedc32a
2 changed files with 5 additions and 1 deletions

View File

@@ -2,7 +2,7 @@
<package > <package >
<metadata> <metadata>
<id>SqlSugar</id> <id>SqlSugar</id>
<version>5.0.6.9</version> <version>5.0.7</version>
<title>SqlSugar .NET ORM Framework 版本, 5.0.3.3-max 最低要求 .Net Framework 4.6 | 5.0.0.2-5.0.3.2 最低要求 .Net Framework 4.5 | 4.0-4.9.11 最低要求 .Net Framework 4.0+ .NET ORM </title> <title>SqlSugar .NET ORM Framework 版本, 5.0.3.3-max 最低要求 .Net Framework 4.6 | 5.0.0.2-5.0.3.2 最低要求 .Net Framework 4.5 | 4.0-4.9.11 最低要求 .Net Framework 4.0+ .NET ORM </title>
<authors>sun kaixuan</authors> <authors>sun kaixuan</authors>
<owners>landa</owners> <owners>landa</owners>

View File

@@ -318,6 +318,8 @@ namespace SqlSugar
string sql = string.Format(CreateIndexSql,this.SqlBuilder.GetTranslationTableName(tableName),string.Join(",",columnNames.Select(it=>this.SqlBuilder.GetTranslationColumnName(it))), string.Join("_", columnNames) + this.Context.CurrentConnectionConfig.IndexSuffix, isUnique ? "UNIQUE" : ""); string sql = string.Format(CreateIndexSql,this.SqlBuilder.GetTranslationTableName(tableName),string.Join(",",columnNames.Select(it=>this.SqlBuilder.GetTranslationColumnName(it))), string.Join("_", columnNames) + this.Context.CurrentConnectionConfig.IndexSuffix, isUnique ? "UNIQUE" : "");
sql = sql.Replace("_" + this.SqlBuilder.SqlTranslationLeft, "_"); sql = sql.Replace("_" + this.SqlBuilder.SqlTranslationLeft, "_");
sql = sql.Replace( this.SqlBuilder.SqlTranslationRight+"_", "_"); sql = sql.Replace( this.SqlBuilder.SqlTranslationRight+"_", "_");
sql = sql.Replace(this.SqlBuilder.SqlTranslationLeft+ this.SqlBuilder.SqlTranslationLeft, this.SqlBuilder.SqlTranslationLeft);
sql = sql.Replace(this.SqlBuilder.SqlTranslationRight + this.SqlBuilder.SqlTranslationRight, this.SqlBuilder.SqlTranslationRight);
this.Context.Ado.ExecuteCommand(sql); this.Context.Ado.ExecuteCommand(sql);
return true; return true;
} }
@@ -326,6 +328,8 @@ namespace SqlSugar
string sql = string.Format(CreateIndexSql, this.SqlBuilder.GetTranslationTableName(tableName), string.Join(",", columnNames.Select(it => this.SqlBuilder.GetTranslationColumnName(it))), string.Join("_", columnNames) + this.Context.CurrentConnectionConfig.IndexSuffix + "_Unique","UNIQUE" ); string sql = string.Format(CreateIndexSql, this.SqlBuilder.GetTranslationTableName(tableName), string.Join(",", columnNames.Select(it => this.SqlBuilder.GetTranslationColumnName(it))), string.Join("_", columnNames) + this.Context.CurrentConnectionConfig.IndexSuffix + "_Unique","UNIQUE" );
sql = sql.Replace("_" + this.SqlBuilder.SqlTranslationLeft, "_"); sql = sql.Replace("_" + this.SqlBuilder.SqlTranslationLeft, "_");
sql = sql.Replace(this.SqlBuilder.SqlTranslationRight + "_", "_"); sql = sql.Replace(this.SqlBuilder.SqlTranslationRight + "_", "_");
sql = sql.Replace(this.SqlBuilder.SqlTranslationLeft + this.SqlBuilder.SqlTranslationLeft, this.SqlBuilder.SqlTranslationLeft);
sql = sql.Replace(this.SqlBuilder.SqlTranslationRight + this.SqlBuilder.SqlTranslationRight, this.SqlBuilder.SqlTranslationRight);
this.Context.Ado.ExecuteCommand(sql); this.Context.Ado.ExecuteCommand(sql);
return true; return true;
} }