From 51c5f037f424ab92ffa819f9504cb84f41f667e3 Mon Sep 17 00:00:00 2001 From: Vikram Rangnekar Date: Sun, 10 Nov 2019 01:41:58 -0500 Subject: [PATCH] Fix bug with migration filename generation --- serv/cmd_migrate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serv/cmd_migrate.go b/serv/cmd_migrate.go index 90cf04e..749aef7 100644 --- a/serv/cmd_migrate.go +++ b/serv/cmd_migrate.go @@ -124,7 +124,7 @@ func cmdDBNew(cmd *cobra.Command, args []string) { os.Exit(1) } - mname := fmt.Sprintf("%d_%s.sql", (len(m) + 1), name) + mname := fmt.Sprintf("%d_%s.sql", len(m), name) // Write new migration mpath := filepath.Join(conf.MigrationsPath, mname)