-
Notifications
You must be signed in to change notification settings - Fork 4
Run migrations automatically on app startup #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #145 +/- ##
==========================================
- Coverage 65.14% 64.28% -0.87%
==========================================
Files 50 50
Lines 2677 2710 +33
==========================================
- Hits 1744 1742 -2
- Misses 807 841 +34
- Partials 126 127 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Also support two separate DB users: A migration user, and a regular user.
2fedec4 to
f776c91
Compare
| migrationPasswordFile: /secrets/db-migration-password | ||
| ``` | ||
|
|
||
| 2. **Environment Variable**: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be using environment variables for passwords? We're using Postgres, could we use .pgpass instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We support both env vars and PG pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Env vars are quite popular but should we note somewhere that we don't recommend using them for production setups?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's noted in the documentation.
| -- This allows normal operations with limited privileges | ||
| DO $$ | ||
| BEGIN | ||
| IF EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'db_app') THEN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: who is creating the db_app role?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be fixed.
Also support two separate DB users: A migration user, and a regular user.