pgschema icon indicating copy to clipboard operation
pgschema copied to clipboard

Bug with apply, grants and order application

Open ludat opened this issue 9 months ago • 0 comments

Old schema:

GRANT UPDATE ON sometable TO app_user;

New schema:

GRANT UPDATE (somecolumn) ON sometable TO app_user;

Generated migration:

GRANT UPDATE (somecolumn) ON TABLE sometable TO app_user;

REVOKE UPDATE ON TABLE sometable FROM app_user;

Which results in the user having no permissions. I guess this is a bug with the order in which statments are apply, I'd expect REVOKE statements to appear before GRANT statements

ludat avatar Feb 26 '26 03:02 ludat