From 3a82baec9d793edf81ac2b151b0f4d4159641375 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Mon, 1 Apr 2024 11:09:25 -0400 Subject: login and register, liking on homepage --- src/db/migrations/0001.sql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/db/migrations/0001.sql (limited to 'src/db/migrations/0001.sql') diff --git a/src/db/migrations/0001.sql b/src/db/migrations/0001.sql new file mode 100644 index 0000000..d20d895 --- /dev/null +++ b/src/db/migrations/0001.sql @@ -0,0 +1,17 @@ +BEGIN TRANSACTION; +SET search_path = public; + +-- Migration Start +CREATE ROLE authenticator LOGIN NOINHERIT NOCREATEDB NOCREATEROLE NOSUPERUSER; +-- scary, make sure the db is not public!!! +ALTER ROLE authenticator WITH PASSWORD 'postgrest'; +CREATE ROLE rest_anon NOLOGIN; +CREATE ROLE rest_user NOLOGIN; +GRANT rest_anon TO authenticator; +GRANT rest_user TO authenticator; +-- Migration End; + +-- Set Current Revision +UPDATE sys.database_info SET curr_revision = 2 WHERE name = current_database(); + +COMMIT TRANSACTION; -- cgit v1.2.3-freya