Skip to content

Conversation

@dmjb
Copy link
Member

@dmjb dmjb commented Nov 20, 2025

Also support two separate DB users: A migration user, and a regular user.

@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 0% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.28%. Comparing base (d15206f) to head (0be59c6).

Files with missing lines Patch % Lines
internal/config/config.go 0.00% 33 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

dmjb added 3 commits November 20, 2025 12:05
Also support two separate DB users: A migration user, and a regular
user.
@dmjb dmjb force-pushed the migrate-on-startup branch from 2fedec4 to f776c91 Compare November 20, 2025 12:05
migrationPasswordFile: /secrets/db-migration-password
```

2. **Environment Variable**:
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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?

Copy link
Member Author

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
Copy link
Contributor

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?

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants