Procházet zdrojové kódy

oracle跳过初始创建数据库, 添加大文本类型字段对oracle的支持

黄智威 před 3 roky
rodič
revize
4c1a7ca658

+ 6 - 6
Admin.NET/Admin.NET.Core/Entity/SysLogDiff.cs

@@ -9,37 +9,37 @@ public class SysLogDiff : EntityBase
     /// <summary>
     /// 操作前记录
     /// </summary>
-    [SugarColumn(ColumnDescription = "操作前记录", ColumnDataType = "text")]
+    [SugarColumn(ColumnDescription = "操作前记录", ColumnDataType = "longtext,text,clob")]
     public string BeforeData { get; set; }
 
     /// <summary>
     /// 操作后记录
     /// </summary>
-    [SugarColumn(ColumnDescription = "操作后记录", ColumnDataType = "text")]
+    [SugarColumn(ColumnDescription = "操作后记录", ColumnDataType = "longtext,text,clob")]
     public string AfterData { get; set; }
 
     /// <summary>
     /// Sql
     /// </summary>
-    [SugarColumn(ColumnDescription = "Sql", ColumnDataType = "text")]
+    [SugarColumn(ColumnDescription = "Sql", ColumnDataType = "longtext,text,clob")]
     public string Sql { get; set; }
 
     /// <summary>
     /// 参数  手动传入的参数
     /// </summary>
-    [SugarColumn(ColumnDescription = "参数", ColumnDataType = "text")]
+    [SugarColumn(ColumnDescription = "参数", ColumnDataType = "longtext,text,clob")]
     public string Parameters { get; set; }
 
     /// <summary>
     /// 业务对象
     /// </summary>
-    [SugarColumn(ColumnDescription = "业务对象", ColumnDataType = "text")]
+    [SugarColumn(ColumnDescription = "业务对象", ColumnDataType = "longtext,text,clob")]
     public string BusinessData { get; set; }
 
     /// <summary>
     /// 差异操作
     /// </summary>
-    [SugarColumn(ColumnDescription = "差异操作", ColumnDataType = "text")]
+    [SugarColumn(ColumnDescription = "差异操作", ColumnDataType = "longtext,text,clob")]
     public string DiffType { get; set; }
 
     /// <summary>

+ 5 - 5
Admin.NET/Admin.NET.Core/Entity/SysLogEx.cs

@@ -23,31 +23,31 @@ public class SysLogEx : EntityBase
     /// <summary>
     /// 异常名称
     /// </summary>
-    [SugarColumn(ColumnDescription = "异常名称", ColumnDataType = "text")]
+    [SugarColumn(ColumnDescription = "异常名称", ColumnDataType = "longtext,text,clob")]
     public string ExceptionName { get; set; }
 
     /// <summary>
     /// 异常信息
     /// </summary>
-    [SugarColumn(ColumnDescription = "异常信息", ColumnDataType = "text")]
+    [SugarColumn(ColumnDescription = "异常信息", ColumnDataType = "longtext,text,clob")]
     public string ExceptionMsg { get; set; }
 
     /// <summary>
     /// 异常源
     /// </summary>
-    [SugarColumn(ColumnDescription = "异常源", ColumnDataType = "text")]
+    [SugarColumn(ColumnDescription = "异常源", ColumnDataType = "longtext,text,clob")]
     public string ExceptionSource { get; set; }
 
     /// <summary>
     /// 堆栈信息
     /// </summary>
-    [SugarColumn(ColumnDescription = "堆栈信息", ColumnDataType = "text")]
+    [SugarColumn(ColumnDescription = "堆栈信息", ColumnDataType = "longtext,text,clob")]
     public string StackTrace { get; set; }
 
     /// <summary>
     /// 参数对象
     /// </summary>
-    [SugarColumn(ColumnDescription = "参数对象", ColumnDataType = "text")]
+    [SugarColumn(ColumnDescription = "参数对象", ColumnDataType = "longtext,text,clob")]
     public string ParamsObj { get; set; }
 
     /// <summary>

+ 3 - 3
Admin.NET/Admin.NET.Core/Entity/SysLogOp.cs

@@ -15,7 +15,7 @@ public class SysLogOp : EntityBase
     /// <summary>
     /// 具体消息
     /// </summary>
-    [SugarColumn(ColumnDescription = "具体消息", ColumnDataType = "text")]
+    [SugarColumn(ColumnDescription = "具体消息", ColumnDataType = "longtext,text,clob")]
     public string Message { get; set; }
 
     /// <summary>
@@ -77,13 +77,13 @@ public class SysLogOp : EntityBase
     /// <summary>
     /// 请求参数
     /// </summary>
-    [SugarColumn(ColumnDescription = "请求参数", ColumnDataType = "text")]
+    [SugarColumn(ColumnDescription = "请求参数", ColumnDataType = "longtext,text,clob")]
     public string Param { get; set; }
 
     /// <summary>
     /// 返回结果
     /// </summary>
-    [SugarColumn(ColumnDescription = "返回结果", ColumnDataType = "text")]
+    [SugarColumn(ColumnDescription = "返回结果", ColumnDataType = "longtext,text,clob")]
     public string Result { get; set; }
 
     /// <summary>

+ 1 - 1
Admin.NET/Admin.NET.Core/Entity/SysLogVis.cs

@@ -15,7 +15,7 @@ public class SysLogVis : EntityBase
     /// <summary>
     /// 具体消息
     /// </summary>
-    [SugarColumn(ColumnDescription = "具体消息", ColumnDataType = "text")]
+    [SugarColumn(ColumnDescription = "具体消息", ColumnDataType = "longtext,text,clob")]
     public string Message { get; set; }
 
     /// <summary>

+ 4 - 1
Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs

@@ -143,7 +143,10 @@ public static class SqlSugarSetup
         // 创建数据库
         dbOptions.ConnectionConfigs.ForEach(config =>
         {
-            db.GetConnectionScope(config.ConfigId).DbMaintenance.CreateDatabase();
+            if (config.DbType != DbType.Oracle)
+            {
+                db.GetConnectionScope(config.ConfigId).DbMaintenance.CreateDatabase();
+            }
         });
 
         // 获取所有实体表