-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
138 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-- Add `CREATE EXTENSION` SQL here. This script is only run on the local | ||
-- database - you are expected to manually install each extension on remote | ||
-- databases. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
-- | ||
-- PostgreSQL database cluster dump | ||
-- | ||
|
||
SET default_transaction_read_only = off; | ||
|
||
SET client_encoding = 'UTF8'; | ||
SET standard_conforming_strings = on; | ||
|
||
-- | ||
-- Roles | ||
-- | ||
|
||
CREATE ROLE anon; | ||
ALTER ROLE anon WITH NOSUPERUSER NOINHERIT NOCREATEROLE NOCREATEDB NOLOGIN NOREPLICATION NOBYPASSRLS; | ||
CREATE ROLE authenticated; | ||
ALTER ROLE authenticated WITH NOSUPERUSER NOINHERIT NOCREATEROLE NOCREATEDB NOLOGIN NOREPLICATION NOBYPASSRLS; | ||
CREATE ROLE authenticator; | ||
ALTER ROLE authenticator WITH NOSUPERUSER NOINHERIT NOCREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS PASSWORD 'postgres'; | ||
CREATE ROLE dashboard_user; | ||
ALTER ROLE dashboard_user WITH NOSUPERUSER INHERIT CREATEROLE CREATEDB NOLOGIN REPLICATION NOBYPASSRLS; | ||
CREATE ROLE pgbouncer; | ||
ALTER ROLE pgbouncer WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS PASSWORD 'postgres'; | ||
CREATE ROLE service_role; | ||
ALTER ROLE service_role WITH NOSUPERUSER NOINHERIT NOCREATEROLE NOCREATEDB NOLOGIN NOREPLICATION BYPASSRLS; | ||
CREATE ROLE supabase_admin; | ||
ALTER ROLE supabase_admin WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLICATION BYPASSRLS PASSWORD 'postgres'; | ||
CREATE ROLE supabase_auth_admin; | ||
ALTER ROLE supabase_auth_admin WITH NOSUPERUSER NOINHERIT CREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS PASSWORD 'postgres'; | ||
CREATE ROLE supabase_storage_admin; | ||
ALTER ROLE supabase_storage_admin WITH NOSUPERUSER NOINHERIT CREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS PASSWORD 'postgres'; | ||
-- | ||
-- User Configurations | ||
-- | ||
|
||
-- | ||
-- User Config "anon" | ||
-- | ||
|
||
ALTER ROLE anon SET statement_timeout TO '3s'; | ||
-- | ||
-- User Configurations | ||
-- | ||
|
||
-- | ||
-- User Config "authenticated" | ||
-- | ||
|
||
ALTER ROLE authenticated SET statement_timeout TO '8s'; | ||
-- | ||
-- User Configurations | ||
-- | ||
|
||
-- | ||
-- User Config "postgres" | ||
-- | ||
|
||
ALTER ROLE postgres SET search_path TO E'\\$user', 'public', 'extensions'; | ||
-- | ||
-- User Configurations | ||
-- | ||
|
||
-- | ||
-- User Config "supabase_admin" | ||
-- | ||
|
||
ALTER ROLE supabase_admin SET search_path TO '$user', 'public', 'auth', 'extensions'; | ||
-- | ||
-- User Configurations | ||
-- | ||
|
||
-- | ||
-- User Config "supabase_auth_admin" | ||
-- | ||
|
||
ALTER ROLE supabase_auth_admin SET search_path TO 'auth'; | ||
-- | ||
-- User Configurations | ||
-- | ||
|
||
-- | ||
-- User Config "supabase_storage_admin" | ||
-- | ||
|
||
ALTER ROLE supabase_storage_admin SET search_path TO 'storage'; | ||
|
||
|
||
-- | ||
-- Role memberships | ||
-- | ||
|
||
GRANT anon TO authenticator GRANTED BY postgres; | ||
GRANT authenticated TO authenticator GRANTED BY postgres; | ||
GRANT service_role TO authenticator GRANTED BY postgres; | ||
GRANT supabase_admin TO authenticator GRANTED BY postgres; | ||
|
||
|
||
|
||
|
||
-- | ||
-- PostgreSQL database cluster dump complete | ||
-- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Supabase | ||
**/supabase/.branches | ||
**/supabase/.temp | ||
**/supabase/.env | ||
**/supabase/.globals.sql |