diff --git a/packages/db/migrations/0078.do.grant_update_rls_on_labels.sql b/packages/db/migrations/0078.do.grant_update_rls_on_labels.sql new file mode 100755 index 000000000..84ca73f94 --- /dev/null +++ b/packages/db/migrations/0078.do.grant_update_rls_on_labels.sql @@ -0,0 +1,11 @@ +-- Type: DO +-- Name: grant_update_rls_on_labels +-- Description: Add RLS update permission to the labels table + +BEGIN; + +CREATE POLICY update_labels on omnivore.labels + FOR UPDATE TO omnivore_user + WITH CHECK (true); + +COMMIT; diff --git a/packages/db/migrations/0078.undo.grant_update_rls_on_labels.sql b/packages/db/migrations/0078.undo.grant_update_rls_on_labels.sql new file mode 100755 index 000000000..dd7719285 --- /dev/null +++ b/packages/db/migrations/0078.undo.grant_update_rls_on_labels.sql @@ -0,0 +1,9 @@ +-- Type: UNDO +-- Name: grant_update_rls_on_labels +-- Description: Add RLS update permission to the labels table + +BEGIN; + +DROP POLICY update_labels on omnivore.labels ; + +COMMIT;