diff --git a/driver/postgres/postgres.go b/driver/postgres/postgres.go index dd977fe..bacd2ee 100644 --- a/driver/postgres/postgres.go +++ b/driver/postgres/postgres.go @@ -109,7 +109,7 @@ func (driver *Driver) Migrate(f file.File, pipe chan interface{}) { func (driver *Driver) Version() (uint64, error) { var version uint64 - err := driver.db.QueryRow("SELECT version FROM " + tableName + " ORDER BY version DESC").Scan(&version) + err := driver.db.QueryRow("SELECT version FROM " + tableName + " ORDER BY version DESC LIMIT 1").Scan(&version) switch { case err == sql.ErrNoRows: return 0, nil