Fix goose status

pull/4/head
Vojtech Vitek (V-Teq) 2016-03-08 16:19:37 -05:00
parent 946d2ad074
commit 9c5211d3d4
1 changed files with 4 additions and 1 deletions

View File

@ -17,6 +17,9 @@ func Status(db *sql.DB, dir string) error {
return err
}
ms := migrationSorter(migrations)
ms.Sort(0)
// must ensure that the version table exists if we're running on a pristine DB
if _, err := EnsureDBVersion(db); err != nil {
return err
@ -25,7 +28,7 @@ func Status(db *sql.DB, dir string) error {
fmt.Println("goose: status")
fmt.Println(" Applied At Migration")
fmt.Println(" =======================================")
for _, m := range migrations {
for _, m := range ms {
printMigrationStatus(db, m.Version, filepath.Base(m.Source))
}