Flyway "No value provided for placeholder" in CI
A migration contains a ${...} placeholder, and Flyway found no value for it. By default Flyway fails on an unresolved placeholder rather than running ambiguous SQL - a configuration gap, not a transient failure.
What this error means
flyway migrate fails naming a placeholder it could not resolve, before applying the migration. It is deterministic - the value is simply not configured for this run.
ERROR: No value provided for placeholder expressions:
${tablespace}. Check your configuration!Common causes
Placeholder value not supplied
The migration references ${tablespace} (or similar), but no -placeholders.tablespace=..., config entry, or env var provided a value.
Unintended placeholder syntax in SQL
A literal ${...} meant as data (e.g. in a function body) is interpreted as a placeholder because placeholder replacement is enabled.
How to fix it
Provide the placeholder value
Pass the value on the command line, in config, or via the FLYWAY_PLACEHOLDERS_* env vars.
flyway migrate -placeholders.tablespace=app_ts
# or via env
export FLYWAY_PLACEHOLDERS_TABLESPACE=app_tsDisable replacement for literal ${...}
If the ${...} is real SQL, not a placeholder, turn off placeholder replacement (or change the prefix).
flyway migrate -placeholderReplacement=falseHow to prevent it
- Define every placeholder used by migrations in config or CI env.
- Avoid literal
${...}in SQL when placeholder replacement is on. - Keep placeholder names consistent and documented.