Skip to content

Commit

Permalink
use text instead of meaningless varchar in sqlite dialect
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoiron committed Jul 1, 2013
1 parent e164a79 commit dce7911
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dce7911

Please sign in to comment.