mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Add: ConnMoreSettings.OracleCodeFirstNvarchar2
This commit is contained in:
parent
fdf6b6b6e3
commit
f5f6d454e3
@ -22,6 +22,7 @@ namespace SqlSugar
|
||||
public DateTime? DbMinDate { get; set; } = DateTime.MinValue.Date.AddYears(1900 - 1);
|
||||
public bool IsNoReadXmlDescription { get; set; }
|
||||
public bool SqlServerCodeFirstNvarchar { get; set; }
|
||||
public bool OracleCodeFirstNvarchar2 { get; set; }
|
||||
public bool SqliteCodeFirstEnableDefaultValue { get; set; }
|
||||
public bool SqliteCodeFirstEnableDescription { get; set; }
|
||||
public bool IsAutoUpdateQueryFilter { get; set; }
|
||||
|
@ -617,6 +617,13 @@ WHERE table_name = '"+tableName+"'");
|
||||
{
|
||||
item.DataType = "NUMBER GENERATED ALWAYS AS IDENTITY";
|
||||
}
|
||||
if (item.DataType != null && this.Context.CurrentConnectionConfig?.MoreSettings?.OracleCodeFirstNvarchar2 == true)
|
||||
{
|
||||
if (!item.DataType.ToLower().Contains("nvarchar2"))
|
||||
{
|
||||
item.DataType = item.DataType.ToLower().Replace("varchar", "nvarchar2");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
string sql = GetCreateTableSql(tableName, columns);
|
||||
|
@ -647,6 +647,7 @@ namespace SqlSugar
|
||||
DbMinDate=it.MoreSettings.DbMinDate,
|
||||
IsNoReadXmlDescription=it.MoreSettings.IsNoReadXmlDescription,
|
||||
SqlServerCodeFirstNvarchar=it.MoreSettings.SqlServerCodeFirstNvarchar,
|
||||
OracleCodeFirstNvarchar2=it.MoreSettings.OracleCodeFirstNvarchar2,
|
||||
IsAutoToUpper=it.MoreSettings.IsAutoToUpper,
|
||||
IsAutoDeleteQueryFilter=it.MoreSettings.IsAutoDeleteQueryFilter,
|
||||
IsAutoUpdateQueryFilter = it.MoreSettings.IsAutoUpdateQueryFilter,
|
||||
|
Loading…
Reference in New Issue
Block a user