Skip to content

fix: [#934] Modify queue database connection when installing db driver#66

Merged
hwbrzzl merged 2 commits intomasterfrom
bowen/#934
Mar 28, 2026
Merged

fix: [#934] Modify queue database connection when installing db driver#66
hwbrzzl merged 2 commits intomasterfrom
bowen/#934

Conversation

@hwbrzzl
Copy link
Copy Markdown
Contributor

@hwbrzzl hwbrzzl commented Mar 28, 2026

Summary

  • Extract driver name into a variable to avoid hardcoded string repetition
  • Set DB_CONNECTION in .env and .env.example during install instead of modifying database.go default connection
  • Use driver variable in RemoveConfig call during uninstall

Closes #934

Why

Previously, the setup installer set the default database connection by modifying the database.go config file directly (modify.AddConfig("default", "sqlserver")). This approach was inconsistent with the preferred pattern of using environment variables to control the active connection.

The install step now writes DB_CONNECTION=sqlserver to .env and .env.example (when they exist) using modify.Env, which is the correct place to configure the default connection at runtime. The driver name is also extracted into a driver variable so it is defined in one place and reused throughout the install/uninstall logic.

@hwbrzzl hwbrzzl requested a review from a team as a code owner March 28, 2026 02:35
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • 🚀 Review Ready

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f0d06bba-8675-469e-ae89-7313c6f74916

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bowen/#934

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hwbrzzl hwbrzzl merged commit 3f22017 into master Mar 28, 2026
6 checks passed
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.

1 participant