fix: standardize command substitution syntax in Supabase template SQL scripts

- Updated command substitution syntax to use backticks consistently across SQL scripts.
- Ensured proper formatting for JWT and PostgreSQL user settings.
This commit is contained in:
Mauricio Siu 2025-03-15 13:16:06 -06:00
parent e422bf9ecd
commit a3d3c32112

View File

@ -305,20 +305,20 @@ config:
- filePath: /volumes/db/jwt.sql - filePath: /volumes/db/jwt.sql
content: | content: |
\\set jwt_secret \`echo "$JWT_SECRET"\` \set jwt_secret `echo "$JWT_SECRET"`
\\set jwt_exp \`echo "$JWT_EXP"\` \set jwt_exp `echo "$JWT_EXP"`
ALTER DATABASE postgres SET "app.settings.jwt_secret" TO :'jwt_secret'; ALTER DATABASE postgres SET "app.settings.jwt_secret" TO :'jwt_secret';
ALTER DATABASE postgres SET "app.settings.jwt_exp" TO :'jwt_exp'; ALTER DATABASE postgres SET "app.settings.jwt_exp" TO :'jwt_exp';
- filePath: /volumes/db/logs.sql - filePath: /volumes/db/logs.sql
content: | content: |
\\set pguser \`echo "$POSTGRES_USER"\` \set pguser `echo "$POSTGRES_USER"`
create schema if not exists _analytics; create schema if not exists _analytics;
alter schema _analytics owner to :pguser; alter schema _analytics owner to :pguser;
- filePath: /volumes/db/realtime.sql - filePath: /volumes/db/realtime.sql
content: | content: |
\\set pguser \`echo "$POSTGRES_USER"\` \set pguser `echo "$POSTGRES_USER"`
create schema if not exists _realtime; create schema if not exists _realtime;
alter schema _realtime owner to :pguser; alter schema _realtime owner to :pguser;