-
Notifications
You must be signed in to change notification settings - Fork 204
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
--defer-constraints defers constraints on all schemas, not just the ones being synced #209
Comments
Hi @philefstat, thanks for the suggestion. I think it should be possible to only defer necessary constraints, but since foreign keys can cascade and span multiple schemas, requires a bit of complexity. Will try to find an approach that works. |
@ankane Thank you for the quick reply. Yeah it sounds like it could become quite complex, hadn't thought about the keys cascading / spanning multiple schemas. We've found an alternative solution in the mean time (a bit of schema restructuring). Happy to close the issue if you'd like. |
Sounds good. Added to ideas (#93). |
Hi there, first of all, thanks for this very useful tool - have been using it for years and it's been very helpful in many different roles.
For context, we're using Supabase which acts as our postgres host and does not provide super user privilege. So far this hasn't been an issue but we recently added a self-referential table which means we need to defer constraints.
Using the command
pgsync --schemas public --debug --defer-constraints
results in the following output:Is it possible to limit deferring constraints to only the schemas being synced?
The text was updated successfully, but these errors were encountered: