Fix SQLite migration for additional account settings - #913
Fix SQLite migration for additional account settings#913PizzaLovingNerd wants to merge 2 commits into
Conversation
|
@PizzaLovingNerd is attempting to deploy a commit to the NetBird GmbH Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
Next review available in: 44 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe migration guide now installs required SQLite and PostgreSQL tools on Debian/Ubuntu and macOS. It also casts two account settings to boolean values during migration. ChangesSQLite to PostgreSQL migration guide
Estimated code review effort: 1 (Trivial) | ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pages/selfhosted/maintenance/scaling/migrate-sqlite-to-postgresql.mdx`:
- Around line 49-50: Update the macOS Homebrew installation instructions around
the brew install command to either expose the keg-only sqlite3 and libpq bin
directories on PATH for required host-side tools, or remove those formulas and
clarify they are unnecessary. Ensure the documented command leaves required
sqlite3 and psql tools usable.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 51fcc657-fcfb-4030-89e4-54ec9f897501
📒 Files selected for processing (1)
src/pages/selfhosted/maintenance/scaling/migrate-sqlite-to-postgresql.mdx
| # macOS | ||
| brew install pgloader | ||
| brew install pgloader sqlite3 libpq |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
curl -fsSL https://formulae.brew.sh/api/formula/sqlite.json |
jq -e '.keg_only and (.aliases | index("sqlite3")) != null'
curl -fsSL https://formulae.brew.sh/api/formula/libpq.json |
jq -e '.keg_only and (.executables | index("psql")) != null'Repository: netbirdio/docs
Length of output: 162
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- target section ---'
sed -n '35,90p' src/pages/selfhosted/maintenance/scaling/migrate-sqlite-to-postgresql.mdx
printf '%s\n' '--- tool references in the page ---'
rg -n -C 2 '\b(pgloader|sqlite3|psql|libpq|PATH|brew install)\b' \
src/pages/selfhosted/maintenance/scaling/migrate-sqlite-to-postgresql.mdx
printf '%s\n' '--- Homebrew metadata relevant to the claim ---'
for formula in sqlite libpq pgloader; do
curl -fsSL "https://formulae.brew.sh/api/formula/${formula}.json" |
jq -c '{name,aliases,keg_only,executables,installed_as_dependency,dependencies}'
doneRepository: netbirdio/docs
Length of output: 3881
Expose keg-only Homebrew client tools or remove them from the install command.
Homebrew installs sqlite (sqlite3 alias) and libpq as keg-only formulas. The command does not place sqlite3 or psql on PATH. Add the formula bin directories to PATH if host-side client tools are required. Otherwise, remove these formulas or state that they are not required.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/pages/selfhosted/maintenance/scaling/migrate-sqlite-to-postgresql.mdx`
around lines 49 - 50, Update the macOS Homebrew installation instructions around
the brew install command to either expose the keg-only sqlite3 and libpq bin
directories on PATH for required host-side tools, or remove those formulas and
clarify they are unnecessary. Ensure the documented command leaves required
sqlite3 and psql tools usable.
Source: MCP tools
Summary
Updates the SQLite-to-PostgreSQL migration guide to cast two additional account settings to PostgreSQL booleans:
settings_metrics_push_enabledsettings_agent_network_onlyWithout these casts, pgloader can retain incompatible SQLite types and defaults, causing the migration to fail with
invalid input syntax for type numeric: "false".The installation instructions now also include the SQLite and PostgreSQL command-line tools used by the guide.
Validation
Tested changes in a fresh Ubuntu 24.04 virtual machine.
npm run lint:mdxpasses.npm run buildpasses.git diff --checkpasses.Summary by CodeRabbit