lecaillon / Evolve

Database migration tool for .NET and .NET Core projects. Inspired by Flyway.
https://evolve-db.netlify.com
MIT License
846 stars 112 forks source link

Can command line interface accept password from environment #285

Closed kiranpradeep closed 1 year ago

kiranpradeep commented 1 year ago

Currently when I use command line interface, the password is to be part of connection string. Is it possible to allow the password to be accepted from environment? E.g. PGPASSWORD

In devops pipelines, this lets remaining portion of connection string to be part of YML files and not necessarily be secret.

lecaillon commented 1 year ago
evolve migrate postgresql -c "Server=127.0.0.1;Database=my_database;User Id=postgres;Password=$Env:PGPASSWORD"

This is working for me (PowerShell)