From 743dafb1b6849353d6ba26cfc9b0ff109a9d3d28 Mon Sep 17 00:00:00 2001 From: Justin Hawkins Date: Sun, 5 Mar 2023 09:18:47 +1030 Subject: [PATCH] Better comments --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index f10328d..16170ee 100644 --- a/main.go +++ b/main.go @@ -6,17 +6,21 @@ import ( ) func main() { + // create a migrator, connecting to the postgresql + // database defined by the environment variable migrator, err := migrations.NewMigrator(os.Getenv("DB_DNS")) if err != nil { panic(err) } + // get the current migration status now, exp, info, err := migrator.Info() if err != nil { panic(err) } if now < exp { - // migration is required, dump out the current state and perform the migration + // migration is required, dump out the current state + // and perform the migration println("migration needed, current state:") println(info)