New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON configuration doesn't not support url as an object anymore #1112
Comments
No, it was not an intentional breaking change It seems to be that the Would you like to draft a PR to allow this explicitly? node-pg-migrate/bin/node-pg-migrate.ts Lines 391 to 403 in 569d173
I'm asking to let you the implementation, because so you can take some work from my shoulders as well as I can do a second eye-pair review and additionally you gain the credits of contributing to the project 😃 |
Thank you for the confirmation @Shinigami92. I'll try to create a PR tomorrow for it but basically the fix is to remove node-pg-migrate/bin/node-pg-migrate.ts Lines 512 to 515 in 569d173
As a side note, I think it was officially supported per (cf. https://salsita.github.io/node-pg-migrate/#/cli?id=json-configuration):
Which links to https://node-postgres.com/features/connecting#connection-uri. It was even given as an example of valid configuration by @dolezel in #599 (comment) |
Even when officially supported, the CI did not FAIL! And thanks 🙏 I will leave an eye open for your PR 🙂 |
@Shinigami92 there it is #1119 |
Describe the bug
Thanks to a change introduced in #599 (comment) it was possible prior v7.0.0 to use a JSON configuration with the
url
property being an object containing the propertyconnectionString
.For example, the following would work:
but doesn't in
v7.0.0
. I suspect it is due to this check here:node-pg-migrate/bin/node-pg-migrate.ts
Line 392 in dbc4207
url
being anything else than astring
whereas before it was not:node-pg-migrate/bin/node-pg-migrate
Lines 302 to 303 in 9331f6f
If it is an intentional breaking change, it is worth updating the documentation to remove the note saying:
Steps to reproduce
Try to run with the following configuration:
You will eventually get the error:
Logs
No response
System Info
Used Module System
esm
The text was updated successfully, but these errors were encountered: