Skip to content

v2.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Oct 13:37
· 7 commits to dev since this release

v2.0.0

Breaking change: raw migration variable expansion

Migration placeholders matching ${MIGRATION_[A-Z0-9_]+} are now replaced
byte-for-byte with their environment values in one regex pass. Replacement is
allowed in every SQL lexical context, including quoted strings, identifiers,
comments, dollar-quoted bodies, adjacent text, and raw SQL fragments.

The runner no longer automatically quotes, escapes, casts, or validates a
replacement as SQL. Migration authors must provide any required SQL syntax,
including string quotes, casts, and dollar-quote delimiters. Migrations that
relied on the previous PostgreSQL-literal rendering or standalone-placeholder
validation must be updated before using v2.0.0.

Preserved contracts

  • Repeated placeholders use the first lookup result, in first-occurrence order.
  • Unset variables fail before SQL execution; explicitly empty values are valid.
  • NUL-containing values are rejected.
  • Replacement markers are not recursively expanded.
  • {{ ENV_NAME }} is rendered before migration variables; marker text
    introduced by a migration variable remains unchanged.
  • Source SQL, hashes, migration logs, and --final-sql remain canonical and do
    not contain resolved environment values.
  • Database execution errors remain redacted while preserving Go unwrapping.