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

Privilge on sequences are not diffed #185

Closed
provokateurin opened this issue Jul 13, 2021 · 3 comments
Closed

Privilge on sequences are not diffed #185

provokateurin opened this issue Jul 13, 2021 · 3 comments

Comments

@provokateurin
Copy link

provokateurin commented Jul 13, 2021

SQL a:

create sequence test increment by 1;

SQL b:

create sequence test increment by 1;
grant usage on sequence test to postgres;

This produces an empty diff.

EDIT: I verified that schemainspect correctly produces create and drop statements for given privileges.

@provokateurin
Copy link
Author

I've looked through all the migra code and it works correctly. The problem is schemainspect only returns the privileges for tables. https://github.com/djrobstep/schemainspect/blob/2e417046faad56dd435a9c84050c832ea5f44372/schemainspect/pg/sql/privileges.sql should be updated and then it should work I think.

@provokateurin
Copy link
Author

This is a starting point, but it doesn't include the schema of the sequence which needs to be queried separately.

@provokateurin
Copy link
Author

Ah I see #64 and djrobstep/schemainspect#67 are already there. Sorry for the noise, should have looked there first.

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

1 participant