Skip to content

Commit

Permalink
fix ColumnTypes in migrator
Browse files Browse the repository at this point in the history
  • Loading branch information
BK1031 committed Aug 20, 2024
1 parent f06e87b commit 1eaf41f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error) {
var (
currentDatabase, table = m.CurrentSchema(stmt, stmt.Table)
columnTypeSQL = "SELECT column_name, column_default, is_nullable = 'YES', data_type, character_maximum_length, column_type, column_key, extra, column_comment, numeric_precision, numeric_scale "
rows, err = m.DB.Session(&gorm.Session{}).Table(table).Rows()
rows, err = m.DB.Session(&gorm.Session{}).Table(table).Limit(1).Rows()
)

if err != nil {
Expand Down

0 comments on commit 1eaf41f

Please sign in to comment.