From dce79110cd3c2d8d1709cde41dcbe31a827915a9 Mon Sep 17 00:00:00 2001 From: Jason Moiron Date: Mon, 1 Jul 2013 00:26:03 -0400 Subject: [PATCH] use text instead of meaningless varchar in sqlite dialect --- dialect.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dialect.go b/dialect.go index fcc63c6..ac69355 100644 --- a/dialect.go +++ b/dialect.go @@ -91,11 +91,8 @@ func (d SqliteDialect) ToSqlType(col *ColumnMap) string { return "blob" } - maxsize := col.MaxSize - if col.MaxSize < 1 { - maxsize = 255 - } - return fmt.Sprintf("varchar(%d)", maxsize) + // sqlite ignores maxsize, so we will do that here too + return fmt.Sprintf("text") } // Returns autoincrement