@@ -31,7 +31,7 @@ type IndexField struct {
31
31
KeyName string
32
32
SeqInIndex int
33
33
ColumnName string
34
- Collation string
34
+ Collation sql. NullString
35
35
Cardinality int
36
36
SubPart sql.NullInt64
37
37
Packed sql.NullString
@@ -190,6 +190,7 @@ func (t *Table) parse() error {
190
190
191
191
t .Fields = append (t .Fields , f )
192
192
}
193
+
193
194
if rows .Err () != nil {
194
195
return rows .Err ()
195
196
}
@@ -221,7 +222,7 @@ func getIndexes(db *sql.DB, schema, tableName string) (map[string]Index, error)
221
222
& i .ColumnName , & i .Collation , & i .Cardinality , & i .SubPart ,
222
223
& i .Packed , & i .Null , & i .IndexType , & i .Comment , & i .IndexComment )
223
224
if err != nil {
224
- return nil , fmt .Errorf ("cannot read constraints : %s" , err )
225
+ return nil , fmt .Errorf ("cannot read indexes : %s" , err )
225
226
}
226
227
if index , ok := indexes [i .KeyName ]; ! ok {
227
228
indexes [i .KeyName ] = Index {
@@ -288,7 +289,7 @@ func getTriggers(db *sql.DB, schema, tableName string) ([]Trigger, error) {
288
289
& t .Created , & t .SQLMode , & t .Definer , & t .CharacterSetClient , & t .CollationConnection ,
289
290
& t .DatabaseCollation )
290
291
if err != nil {
291
- return nil , fmt .Errorf ("cannot read constraints : %s" , err )
292
+ return nil , fmt .Errorf ("cannot read trigger : %s" , err )
292
293
}
293
294
triggers = append (triggers , t )
294
295
}
0 commit comments