Skip to content

Commit dd1b571

Browse files
authored
fix: Quote id column as it described in dialect definition
1 parent 435005d commit dd1b571

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

migrate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ func (ms MigrationSet) GetMigrationRecords(db *sql.DB, dialect string) ([]*Migra
707707
}
708708

709709
var records []*MigrationRecord
710-
query := fmt.Sprintf("SELECT * FROM %s ORDER BY id ASC", dbMap.Dialect.QuotedTableForQuery(ms.SchemaName, ms.getTableName()))
710+
query := fmt.Sprintf("SELECT * FROM %s ORDER BY %s ASC", dbMap.Dialect.QuotedTableForQuery(ms.SchemaName, ms.getTableName()), dbMap.Dialect.QuoteField("id"))
711711
_, err = dbMap.Select(&records, query)
712712
if err != nil {
713713
return nil, err

0 commit comments

Comments
 (0)