Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ The migration uses [pgloader](https://github.com/dimitri/pgloader) to transfer d

```bash
# Debian/Ubuntu
sudo apt-get install pgloader
sudo apt-get install pgloader sqlite3 postgresql-client

# macOS
brew install pgloader
brew install pgloader sqlite3 libpq
Comment on lines 49 to +50

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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}'
done

Repository: 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

# Export libpq to the PATH to allow using it's command-line tools.
export PATH="$(brew --prefix libpq)/bin:$PATH"
```

## Create the Migration File
Expand All @@ -74,6 +76,8 @@ CAST
column accounts.settings_lazy_connection_enabled to boolean,
column accounts.settings_peer_expose_enabled to boolean,
column accounts.settings_auto_update_always to boolean,
column accounts.settings_metrics_push_enabled to boolean,
column accounts.settings_agent_network_only to boolean,
column accounts.settings_local_mfa_enabled to boolean
;
```
Expand Down
Loading