Skip to content

Instantly share code, notes, and snippets.

@dbasics
Created April 6, 2026 01:59
Show Gist options
  • Select an option

  • Save dbasics/521e4548fd5d0d66e10be28e6fd181e9 to your computer and use it in GitHub Desktop.

Select an option

Save dbasics/521e4548fd5d0d66e10be28e6fd181e9 to your computer and use it in GitHub Desktop.
Escala - RLS checkins/swaps + fix datas abril
DROP POLICY IF EXISTS anon_read_checkins ON checkins;
CREATE POLICY anon_read_checkins ON checkins FOR SELECT USING (true);
DROP POLICY IF EXISTS auth_insert_checkins ON checkins;
CREATE POLICY auth_insert_checkins ON checkins FOR INSERT WITH CHECK (true);
DROP POLICY IF EXISTS auth_update_checkins ON checkins;
CREATE POLICY auth_update_checkins ON checkins FOR UPDATE USING (true);
DROP POLICY IF EXISTS auth_delete_checkins ON checkins;
CREATE POLICY auth_delete_checkins ON checkins FOR DELETE USING (true);
DROP POLICY IF EXISTS anon_read_swaps ON swaps;
CREATE POLICY anon_read_swaps ON swaps FOR SELECT USING (true);
DROP POLICY IF EXISTS auth_insert_swaps ON swaps;
CREATE POLICY auth_insert_swaps ON swaps FOR INSERT WITH CHECK (true);
UPDATE events SET date = '2026-04-04' WHERE id = '79680ff0-7ea5-4861-8fa3-0e736a01c62b';
UPDATE events SET date = '2026-04-05' WHERE id = 'c83b090f-ab8d-4733-a79d-44cf0afe5017';
UPDATE events SET date = '2026-04-04' WHERE id = '9f4c8c92-8e80-4df1-8003-2d409a2a8e20';
UPDATE events SET date = '2026-04-05' WHERE id = '99391862-8068-46e0-8438-f362197ab615';
UPDATE events SET date = '2026-04-05' WHERE id = 'e3f6005b-ecf2-42a1-ab6c-74e360e313f9';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment