Order the results by the guaranteed unique `id` instead of the potentially non-unique `tstamp`

pull/2/head
Abigail Walthall 2013-01-16 17:25:03 -05:00
parent b7fd3077d1
commit 7b2d93c72a
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ func numericComponent(name string) (int64, error) {
// Create and initialize the DB version table if it doesn't exist.
func ensureDBVersion(db *sql.DB) (int64, error) {
rows, err := db.Query("SELECT version_id, is_applied from goose_db_version ORDER BY tstamp DESC;")
rows, err := db.Query("SELECT version_id, is_applied from goose_db_version ORDER BY id DESC;")
if err != nil {
// XXX: cross platform method to detect failure reason
// for now, assume it was because the table didn't exist, and try to create it