bugfix: getting the right column lines when the culumn type is varchar (n) or number (n, m)

This commit is contained in:
Eryx 2014-07-03 23:35:31 +08:00
parent 4693ad2aee
commit 560525e3ca
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ func (db *sqlite3) GetColumns(tableName string) ([]string, map[string]*core.Colu
} }
nStart := strings.Index(name, "(") nStart := strings.Index(name, "(")
nEnd := strings.Index(name, ")") nEnd := strings.LastIndex(name, ")")
colCreates := strings.Split(name[nStart+1:nEnd], ",") colCreates := strings.Split(name[nStart+1:nEnd], ",")
cols := make(map[string]*core.Column) cols := make(map[string]*core.Column)
colSeq := make([]string, 0) colSeq := make([]string, 0)