fordfrog / apgdiff

Another PostgreSQL Diff Tool
http://www.apgdiff.com
MIT License
355 stars 138 forks source link

Add support for ENABLE/FORCE RLS and RLS policies #213

Closed steve-chavez closed 7 years ago

steve-chavez commented 7 years ago

This adds support for diffing the ALTER TABLE table ENABLE/FORCE ROW LEVEL SECURITY, this is the first part of RLS support, I'll be adding support for CREATE POLICY as well but for now I would like some feedback on this to see if the change in the codebase is good.

chadfurman commented 7 years ago

Can someone second this? Pull it down, build it, see if it works for you?

ruslantalpa commented 7 years ago

@chadfurman although i am working with @steve-chavez on this (i asked him to develop those fixes for https://github.com/subzerocloud/devtools) i did build this branch, and i did some tests (in adition to those in this PR) on schemas with RLS and it works.

Since this PR, i discovered other bugs, related to grants on columns for views which i fixed here https://github.com/subzerocloud/apgdiff/commits/develop and i would be happy to push them upstream but this PR needs to be merged first since i worked on a branch which contained steve's RLS work.

chadfurman commented 7 years ago

merged

ruslantalpa commented 7 years ago

@chadfurman thanks, I'll clean up the code a little bit and create a PR next week

chadfurman commented 7 years ago

https://github.com/fordfrog/apgdiff/pull/210

@ruslantalpa I'm guessing we don't need PR#210 anymore?

ruslantalpa commented 7 years ago

no we don't, that PR only ignored the statement, not actually supported it. @steve-chavez PR + a few small changes from mine, fully support RLS (alter table + create policy)

chadfurman commented 7 years ago

great, thank you :)