Abdelmuhaimen Seaudi | 988aeed | 2021-09-23 21:11:44 +0000 | [diff] [blame] | 1 | --- User Setup |
| 2 | CREATE USER "${PG_USER}" LOGIN; |
| 3 | ALTER USER "${PG_USER}" PASSWORD '${PG_PASSWORD}'; |
| 4 | |
| 5 | CREATE DATABASE ${PG_DATABASE}; |
| 6 | GRANT ALL PRIVILEGES ON DATABASE ${PG_DATABASE} TO "${PG_USER}"; |
| 7 | |
| 8 | --- PG_DATABASE Setup |
| 9 | |
| 10 | \c ${PG_DATABASE} |
| 11 | |
| 12 | CREATE EXTENSION IF NOT EXISTS pg_stat_statements; |
| 13 | CREATE EXTENSION IF NOT EXISTS pgaudit; |
| 14 | |
| 15 | --- Create schema for PG_USER |
| 16 | |
| 17 | \c ${PG_DATABASE} |
| 18 | |
| 19 | CREATE SCHEMA IF NOT EXISTS "${PG_USER}" AUTHORIZATION "${PG_USER}"; |