diff --git a/dialect_sqlite.go b/dialect_sqlite.go index 7d9b2975..911d0d93 100644 --- a/dialect_sqlite.go +++ b/dialect_sqlite.go @@ -52,7 +52,13 @@ func (d SqliteDialect) ToSqlType(val reflect.Type, maxsize int, isAutoIncr bool) if maxsize < 1 { maxsize = 255 } - return fmt.Sprintf("varchar(%d)", maxsize) + + if maxsize < 256 { + return fmt.Sprintf("varchar(%d)", maxsize) + } else { + return "text" + } + } // Returns autoincrement