MattiLehtinen / postgrator-cli

PostgreSQL, MySQL and MS SQL database schema migration tool using plain SQL and JS files
MIT License
41 stars 16 forks source link

Provide connectionstring/dsn #10

Open rhys-vdw opened 5 years ago

rhys-vdw commented 5 years ago

Would be it be possible to support a single DSN argument rather than the host/db/username/pass vars?

(Might be more appropriate to open this issue at postgrator itself)

bcomnes commented 2 years ago

This would be a nice addition. Open to PRs?

bcomnes commented 2 years ago

Apparently all ENV vars that https://node-postgres.com/features/connecting#environment-variables supports also works with this cli. Do you see DSN env var listed here?

https://www.postgresql.org/docs/9.1/libpq-envars.html

perrin4869 commented 2 years ago

I'm not sure about the usefulness of this feature and it doesn't seem to be able to be elegantly implemented... The underlying clients seem to not really work with connection strings. I'd look over a PR implementing this though if you think this would be useful