jasondcamp / pyway

A Flyway like migration manager written in python.
GNU General Public License v3.0
24 stars 12 forks source link

Use environment variables in .pyway.conf file #43

Closed juliennowak closed 7 months ago

juliennowak commented 7 months ago

Hello,

Is it possible to use environment variables in the .pyway.conf file. I want to do something like:

database_type: postgres
database_username: ${DB_USER}
database_password: ${DB_PASSWORD}
database_host: ${DB_HOST}
database_port: ${DB_PORT}
database_name: ${DB_DBNAME}
database_migration_dir: infra/pyway
database_table: public.pyway

I get the following error : _invalid integer value "${ELI_DBPORT}" for connection option "port" Is it something supported with another syntax or not supported at all?

Thanks Julien

jasondcamp commented 7 months ago

This isnt supported now, but a good feature enhancement. I'll add it to the list of work for the next version.

jasondcamp commented 7 months ago

Tagged for version 0.3.22

jasondcamp commented 7 months ago

Update for 0.3.23 and released