Skip to content

Commit 53ae86d

Browse files
committed
Adjust initial postgrest setup migration
1 parent 7452d2c commit 53ae86d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

postgres/migrations/00-init_postgrest.sql

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
\set pgrst_jwt_secret '$PGRST_JWT_SECRET'
22
\set pgrst_authenticator_pass '$PGRST_AUTHENTICATOR_PASS'
33

4-
-- Set the JWT secret in the db - this is required by Postgrest. This is a
5-
-- non-transactional statement, it cannot go inside the below transaction.
6-
alter system set pgrst.jwt_secret = :'pgrst_jwt_secret';
7-
84
begin;
95

106
create role authenticator noinherit login password :'pgrst_authenticator_pass';
@@ -19,3 +15,9 @@ REST API interface, with endpoints documented via Swagger UI. This schema
1915
defines the public contract between the database and clients.';
2016

2117
commit;
18+
19+
-- Non-transactional statements
20+
21+
-- Set the JWT secret in the db - this is required by Postgrest. This is a
22+
-- non-transactional statement, it cannot go inside the below transaction.
23+
alter system set pgrst.jwt_secret = :'pgrst_jwt_secret';

0 commit comments

Comments
 (0)