cli: refactor logic for connecting to database
- Dominant language
- No language data
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
I'm quite sure I have seen this pattern in other CLI commands:
startBuiltinPostgres - codersdk.PostgresAuth - ConnectToPostgres
we may consider some base pattern for all commands using the database
_Originally posted by @mtojek in https://github.com/coder/coder/pull/17091#discussion_r2014730400_
We have a few commands now that can connect to the database directly and need to handle the conditional logic of builtin postgres:
- server
- server create-admin-user
- server regenerate-vapid-keypair
We should refactor and unify this.
We also have the `server dbcrypt` commands under `enterprise/` that could also benefit from this standardized logic.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.