mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Synchronization code
This commit is contained in:
parent
2cadf23fcf
commit
a8b59aac75
@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace SqlSugar
|
||||
{
|
||||
@ -261,7 +262,15 @@ namespace SqlSugar
|
||||
}
|
||||
public override bool AddDefaultValue(string tableName, string columnName, string defaultValue)
|
||||
{
|
||||
return base.AddDefaultValue(this.SqlBuilder.GetTranslationTableName(tableName), this.SqlBuilder.GetTranslationTableName(columnName), defaultValue);
|
||||
if (defaultValue?.StartsWith("'")==true&& defaultValue?.EndsWith("'") == true&& defaultValue?.Contains("(") == false)
|
||||
{
|
||||
string sql = string.Format(AddDefaultValueSql, tableName, columnName, defaultValue);
|
||||
return this.Context.Ado.ExecuteCommand(sql) > 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return base.AddDefaultValue(this.SqlBuilder.GetTranslationTableName(tableName), this.SqlBuilder.GetTranslationTableName(columnName), defaultValue);
|
||||
}
|
||||
}
|
||||
public override bool AddColumnRemark(string columnName, string tableName, string description)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user