acaloiaro / neoq

Queue-agnostic background job library for Go, with a pleasant API and powerful features.
MIT License
270 stars 4 forks source link

feat: Update migrations postgres URI parsing and add tests #116

Closed fbis251 closed 7 months ago

fbis251 commented 8 months ago

This PR updates the parsing and formatting of the URI that is used when applying migrations and adds tests for sample input connStrings

As of 94d7d68539b6980cece521b428733f6c344bc268, using a connString with a non-default port number will ignore the custom port and default to 5432 in PgBackend.initializeDB when attempting to run migrations. The current connString formatting code will read pgxCfg.Host but not pgxCfg.Port when generating the new connString

https://github.com/acaloiaro/neoq/blob/94d7d68539b6980cece521b428733f6c344bc268/backends/postgres/postgres_backend.go#L356-L361

Note that pq-style URLs are not supported, please let me know if you would like support for them

acaloiaro commented 7 months ago

Hi @fbis251 -- are you still interested in moving this PR forward?

fbis251 commented 7 months ago

@acaloiaro I squashed, rebased against main, and updated the PR title to add the feat: prefix

acaloiaro commented 7 months ago

@fbis251 shippin' dreams, thanks again.