From 8e429819485bae8ef2d3842e1b25add4a7a8ae55 Mon Sep 17 00:00:00 2001 From: Oliver Barnwell Date: Wed, 18 Sep 2024 21:34:50 +0100 Subject: [PATCH] experimentally remove cache --- .github/workflows/cypress-e2e-chrome.yml | 9 --------- .github/workflows/cypress-e2e-firefox.yml | 9 --------- .../20240816164300_initial_database_setup.sql | 11 ++++++++--- 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/.github/workflows/cypress-e2e-chrome.yml b/.github/workflows/cypress-e2e-chrome.yml index 0424a0108..59cccfc55 100644 --- a/.github/workflows/cypress-e2e-chrome.yml +++ b/.github/workflows/cypress-e2e-chrome.yml @@ -42,15 +42,6 @@ jobs: with: version: 1.27.7 - run: SUPABASE_SCANNER_BUFFER_SIZE=5mb supabase start - - name: NextCache - uses: actions/cache@v3 - with: - path: ${{ github.workspace }}/.next/cache - # Generate a new cache whenever packages or source files change. - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} - # If source files changed but packages didn't, rebuild from a prior cache. - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}- - name: Cypress run uses: cypress-io/github-action@v4 env: diff --git a/.github/workflows/cypress-e2e-firefox.yml b/.github/workflows/cypress-e2e-firefox.yml index 388ff3ee3..87a595668 100644 --- a/.github/workflows/cypress-e2e-firefox.yml +++ b/.github/workflows/cypress-e2e-firefox.yml @@ -41,15 +41,6 @@ jobs: with: version: 1.27.7 - run: SUPABASE_SCANNER_BUFFER_SIZE=5mb supabase start - - name: NextCache - uses: actions/cache@v3 - with: - path: ${{ github.workspace }}/.next/cache - # Generate a new cache whenever packages or source files change. - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} - # If source files changed but packages didn't, rebuild from a prior cache. - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}- - name: Cypress run uses: cypress-io/github-action@v4 env: diff --git a/supabase/migrations/20240816164300_initial_database_setup.sql b/supabase/migrations/20240816164300_initial_database_setup.sql index bf04d2755..89710a1a6 100644 --- a/supabase/migrations/20240816164300_initial_database_setup.sql +++ b/supabase/migrations/20240816164300_initial_database_setup.sql @@ -317,7 +317,7 @@ CREATE POLICY update_policy ON public.toilets TO toiletmap_web USING (true); -- Allows all updates --- Grant permissions on public.areas +-- Grant permissions on public.areas and set RLS policies. GRANT SELECT ON TABLE public.areas TO toiletmap_web; CREATE POLICY select_policy ON public.areas @@ -326,10 +326,10 @@ CREATE POLICY select_policy ON public.areas USING ( true ); -- Allows all selects --- Grant permissions on audit.record_version - +-- Grant permissions on audit.record_version and set RLS policies. GRANT SELECT ON TABLE audit.record_version TO toiletmap_web; GRANT INSERT ON TABLE audit.record_version TO toiletmap_web; +GRANT UPDATE ON TABLE audit.record_version TO toiletmap_web; CREATE POLICY select_policy ON audit.record_version FOR SELECT @@ -340,3 +340,8 @@ CREATE POLICY insert_policy ON audit.record_version FOR INSERT TO toiletmap_web WITH CHECK (true); -- Allows all inserts + +CREATE POLICY update_policy ON audit.record_version + FOR UPDATE + TO toiletmap_web + USING (true); -- Allows all updates