Skip to content

Commit 9488f2e

Browse files
committed
Add env vars section to Migrations doc
1 parent 7e521be commit 9488f2e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/migrations.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,21 @@ REINDEX
8686
VACUUM
8787
```
8888

89+
## Environment Variables
90+
91+
Env vars can be used in migrations:
92+
93+
```sql
94+
\set pgrst_authenticator_pass '$PGRST_AUTHENTICATOR_PASS'
95+
```
96+
97+
Reduce the chance of environment variables being logged by putting them into
98+
variables with `\set`, then use the value later:
99+
100+
```sql
101+
create role authenticator noinherit login password :'pgrst_authenticator_pass';
102+
```
103+
89104
## Suggested File Layout
90105

91106
SuperStack doesn’t enforce any particular migration file names or layout —

0 commit comments

Comments
 (0)