Skip to content

Commit

Permalink
add rls to audit, enable postgis first
Browse files Browse the repository at this point in the history
  • Loading branch information
ob6160 committed Aug 18, 2024
1 parent 867297f commit 1079901
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
"prisma:postgres:generate": "prisma generate",
"prisma:db:pull": "npm-run-all -p prisma:postgres:db:pull",
"prisma:postgres:db:pull": "prisma db pull",
"supabase:start": "SUPABASE_SCANNER_BUFFER_SIZE=20mb supabase start",
"supabase:start": "SUPABASE_SCANNER_BUFFER_SIZE=100mb supabase start",
"supabase:stop": "supabase stop",
"supabase:reset": "SUPABASE_SCANNER_BUFFER_SIZE=20mb supabase db reset"
"supabase:reset": "SUPABASE_SCANNER_BUFFER_SIZE=100mb supabase db reset"
},
"dependencies": {
"@apollo/client": "^3.9.10",
Expand Down
10 changes: 7 additions & 3 deletions supabase/migrations/20240816164300_initial_database_setup.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
-- Enable postgis extension
CREATE EXTENSION IF NOT EXISTS postgis SCHEMA extensions;


/*
Generic Audit Trigger
Linear Time Record Version History
Expand Down Expand Up @@ -151,10 +155,10 @@ BEGIN
END;
$$;

-- End supa_audit
-- Setup row-level security on audit.record_version
ALTER TABLE audit.record_version enable row level security;

-- Enable postgis extension
CREATE EXTENSION IF NOT EXISTS postgis SCHEMA extensions;
-- End supa_audit

-- Create or update the public.areas table
CREATE TABLE IF NOT EXISTS public.areas (
Expand Down

0 comments on commit 1079901

Please sign in to comment.