diff --git a/cmd/db.go b/cmd/db.go index 9fd6c9014..23e9d1c4e 100644 --- a/cmd/db.go +++ b/cmd/db.go @@ -189,7 +189,9 @@ var ( Use: "reset", Short: "Resets the local database to current migrations", RunE: func(cmd *cobra.Command, args []string) error { - utils.Config.Db.Seed.Enabled = !noSeed + if noSeed { + utils.Config.Db.Seed.Enabled = false + } return reset.Run(cmd.Context(), migrationVersion, flags.DbConfig, afero.NewOsFs()) }, } diff --git a/internal/db/reset/reset_test.go b/internal/db/reset/reset_test.go index d155ed2ee..03da968c5 100644 --- a/internal/db/reset/reset_test.go +++ b/internal/db/reset/reset_test.go @@ -356,6 +356,7 @@ func TestResetRemote(t *testing.T) { // Check error assert.NoError(t, err) }) + t.Run("resets remote database with seed config disabled", func(t *testing.T) { // Setup in-memory fs fsys := afero.NewMemMapFs()