Skip to content

feat: add environment variable support in migration YAML files#50

Open
nlenepveu wants to merge 1 commit into
juneHQ:masterfrom
nlenepveu:feature/env-vars-in-migrations-junehq
Open

feat: add environment variable support in migration YAML files#50
nlenepveu wants to merge 1 commit into
juneHQ:masterfrom
nlenepveu:feature/env-vars-in-migrations-junehq

Conversation

@nlenepveu

Copy link
Copy Markdown

Summary

  • Add {env.VAR} syntax to reference environment variables in migration YAML files
  • Allows dynamic configuration like cluster names or engine types to be injected from the environment
  • Works alongside existing {table} placeholder

Usage Example

production:
  up: |
    CREATE TABLE {table} ON CLUSTER '{env.CLICKHOUSE_CLUSTER}' (
        id UInt64
    ) ENGINE = {env.TABLE_ENGINE}()
    ORDER BY id

Test plan

  • Added unit tests for migrate_up with env vars
  • Added unit tests for migrate_down with env vars
  • All existing tests pass

🤖 Generated with Claude Code

Add {env.VAR} syntax to reference environment variables in migration
SQL templates. This allows dynamic configuration like cluster names
or engine types to be injected from the environment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant