17 lines
514 B
SQL
17 lines
514 B
SQL
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;
|