#1125·goose

`-allow-missing` for per-migration opt-in

Author: nkk1Created Sep 20, 2026Updated Sep 20, 2026

Motivation

Out-of-order behavior is currently a run/provider-wide switch (WithAllowOutofOrder, CLI -allow-missing). This is all-or-nothing: either every pending migration can slot in behind newer applied ones, or none can.

As an end-user of goose I like to have a safe and robust migration plan, knowing exactly the migration that will be out-of-order, making sure I don't run unintended migrations in my production

Proposal

sql migration

  • mark the specific migration to be out of order in sql migration -- +goose AllowOutOfOrder

go

  • mark the specific migration to be out of order in golang migration
reg := goose.NewGoMigration(version, up, down,
    migration.outOfOrder, 
)

cli

  • -allow-missing-all - the current behaviour of migrating all out-of-order migrations
  • -allow-missing - the new behivour of migrating only if marked to be out-of-order migration