From 9140de5045bdce14b902f1f431ecff0c11bf87e2 Mon Sep 17 00:00:00 2001 From: Liam Staskawicz Date: Fri, 4 Jan 2013 19:08:19 -1000 Subject: [PATCH] status: ensure that the version table exists --- cmd_status.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd_status.go b/cmd_status.go index 85123ee..41b0abb 100644 --- a/cmd_status.go +++ b/cmd_status.go @@ -41,6 +41,11 @@ func statusRun(cmd *Command, args ...string) { } defer db.Close() + // must ensure that the version table exists if we're running on a pristine DB + if _, e := ensureDBVersion(db); e != nil { + log.Fatal(e) + } + fmt.Printf("goose: status for environment '%v'\n", conf.Env) fmt.Println(" Applied At Migration") fmt.Println(" =======================================")