Skip to content
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

migration library: specify schema without search path DSN? #603

Open
nexovec opened this issue Sep 19, 2024 · 1 comment
Open

migration library: specify schema without search path DSN? #603

nexovec opened this issue Sep 19, 2024 · 1 comment

Comments

@nexovec
Copy link

nexovec commented Sep 19, 2024

Hi,
is it possible to make migrate do its migration inside a postgres schema and then connect to it with a client without actually spawning an entire new pgxpool(with search_path in the DSN string)?

@bgentry bgentry changed the title client and migration is a schema migration library: specify schema without search path DSN? Sep 20, 2024
@bgentry
Copy link
Contributor

bgentry commented Sep 20, 2024

Search path is currently the only way for the migrator to execute migrations against an alternate schema. I think to do otherwise we would probably need to evolve some sort of string interpolation for schema into our migrations. Might be something we tackle when trying to solve alternate schemas more broadly (there are still a number of other compatibility issues mostly stemming from sqlc not offering a way to inject a schema name dynamically).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants