From 53b294384b1c209a30f7f6a2196fc051cb1717a5 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 21 Mar 2025 08:50:25 +0800 Subject: [PATCH] Update Dm&Oracle --- .../Realization/Dm/DbMaintenance/DmDbMaintenance.cs | 8 ++++++++ .../Oracle/DbMaintenance/OracleDbMaintenance.cs | 2 +- Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Src/Asp.NetCore2/SqlSugar/Realization/Dm/DbMaintenance/DmDbMaintenance.cs b/Src/Asp.NetCore2/SqlSugar/Realization/Dm/DbMaintenance/DmDbMaintenance.cs index 2e595c269..3787e1b61 100644 --- a/Src/Asp.NetCore2/SqlSugar/Realization/Dm/DbMaintenance/DmDbMaintenance.cs +++ b/Src/Asp.NetCore2/SqlSugar/Realization/Dm/DbMaintenance/DmDbMaintenance.cs @@ -653,11 +653,19 @@ WHERE upper(t.TABLE_NAME) = upper('{tableName}') private static void ConvertCreateColumnInfo(DbColumnInfo x) { string[] array = new string[] { "int" }; + if (x.OracleDataType.HasValue()) + { + x.DataType = x.OracleDataType; + } if (array.Contains(x.DataType?.ToLower())) { x.Length = 0; x.DecimalDigits = 0; } + if (x.DecimalDigits > 0 && x.DataType?.ToLower()?.IsIn("varchar", "clob", "varchar2", "nvarchar2", "nvarchar") == true) + { + x.DecimalDigits = 0; + } } #endregion } diff --git a/Src/Asp.NetCore2/SqlSugar/Realization/Oracle/DbMaintenance/OracleDbMaintenance.cs b/Src/Asp.NetCore2/SqlSugar/Realization/Oracle/DbMaintenance/OracleDbMaintenance.cs index f11ff935e..77ee11f1f 100644 --- a/Src/Asp.NetCore2/SqlSugar/Realization/Oracle/DbMaintenance/OracleDbMaintenance.cs +++ b/Src/Asp.NetCore2/SqlSugar/Realization/Oracle/DbMaintenance/OracleDbMaintenance.cs @@ -690,7 +690,7 @@ WHERE table_name = '"+tableName+"'"); x.Length = 0; x.DecimalDigits = 0; } - if(x.DecimalDigits>0&& x.DataType?.ToLower().IsIn("varchar", "clob", "varchar2", "nvarchar2", "nvarchar")==true) + if(x.DecimalDigits>0&& x.DataType?.ToLower()?.IsIn("varchar", "clob", "varchar2", "nvarchar2", "nvarchar")==true) { x.DecimalDigits = 0; } diff --git a/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec b/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec index a579cd67e..575c6d966 100644 --- a/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec +++ b/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec @@ -2,7 +2,7 @@ SqlSugarCore - 5.1.4.185 + 5.1.4.186-preview04 sunkaixuan 果糖大数据科技 http://www.apache.org/licenses/LICENSE-2.0.html