PGRoll constraints not visible in latest migration
Hi,
I have a raw sql migration that creates a unique constraint across a few columns. I want to use this constraint to enforce an upsert workflow. However, in the schema from that migration (public_MIGRATION_NAME) the constraint isn't visible. If I switch to the public schema, it is visible and working, so I can see that it's getting created correctly. Is there something I need to do to get my constraint into my migration schema's view, or should I run another migration, or do something else?
Thanks!
4 Replies
I've created an issue on the pgroll github here:
https://github.com/xataio/pgroll/issues/363
GitHub
Constraints not visible in latest migration schema · Issue #363 · x...
I have a raw sql migration that creates a unique constraint across a few columns. I want to use this constraint to enforce an upsert workflow. However, in the schema from that migration (public_MIG...
Hi, the pgroll dev team will check on the issue. In the meantime, since it sounds like you're using multiple schemas, it's worth clarifying if you're using the --schema parameter https://github.com/xataio/pgroll/blob/main/docs/README.md#command-line-reference to run the migration against a schema other than public?
No, I'm only using the schemas pgroll generates against public as it does migrations
Thanks for clarifying. I see that the dev team checked on the issue and provided some suggestions, let us know here if that helps: https://github.com/xataio/pgroll/issues/363#issuecomment-2191078443
GitHub
Constraints not visible in latest migration schema · Issue #363 · x...
I have a raw sql migration that creates a unique constraint across a few columns. I want to use this constraint to enforce an upsert workflow. However, in the schema from that migration (public_MIG...