From 560525e3cae3d2caa10b4cb36e3c3024e0a7ef4f Mon Sep 17 00:00:00 2001 From: Eryx Date: Thu, 3 Jul 2014 23:35:31 +0800 Subject: [PATCH] bugfix: getting the right column lines when the culumn type is varchar (n) or number (n, m) --- sqlite3_dialect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlite3_dialect.go b/sqlite3_dialect.go index 0626cf4e..ddf6a5f2 100644 --- a/sqlite3_dialect.go +++ b/sqlite3_dialect.go @@ -129,7 +129,7 @@ func (db *sqlite3) GetColumns(tableName string) ([]string, map[string]*core.Colu } nStart := strings.Index(name, "(") - nEnd := strings.Index(name, ")") + nEnd := strings.LastIndex(name, ")") colCreates := strings.Split(name[nStart+1:nEnd], ",") cols := make(map[string]*core.Column) colSeq := make([]string, 0)