From e66cfc3aa5e59aa12b729543e0b00e6cb1bfcc22 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 21 Aug 2017 13:34:26 +0800 Subject: [PATCH] - --- Src/Asp.Net/SqlSugar/Abstract/DbMaintenanceProvider/Methods.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/Abstract/DbMaintenanceProvider/Methods.cs b/Src/Asp.Net/SqlSugar/Abstract/DbMaintenanceProvider/Methods.cs index 3a10e5e48..43d4fa465 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/DbMaintenanceProvider/Methods.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/DbMaintenanceProvider/Methods.cs @@ -239,6 +239,9 @@ namespace SqlSugar string columnName = this.SqlBuilder.GetTranslationTableName(item.DbColumnName); string dataType = item.DataType; string dataSize = item.Length > 0 ? string.Format("({0})", item.Length) : null; + if (item.Length>4000|| item.Length==-1) { + dataSize = string.Format("({0})","max"); + } string nullType = item.IsNullable ? this.CreateTableNull : CreateTableNotNull; string primaryKey = null; string identity = item.IsIdentity ? this.CreateTableIdentity : null;