Skip to content

docs(db): point this repo at its own database, and gate the way back - #143

Merged
github-actions[bot] merged 1 commit into
mainfrom
chore/self-hosted-db-docs
Aug 28, 2026
Merged

docs(db): point this repo at its own database, and gate the way back#143
github-actions[bot] merged 1 commit into
mainfrom
chore/self-hosted-db-docs

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

Why

The schema fix landed in #138 and botsmann is healthy. But the repo still told you to operate a Supabase we do not have.

docs/SUPABASE_SETUP.md opened with "✅ Completed Setup" for a hosted project jkjmhtirxwhljpkcfxqe.supabase.co in eu-west-1, and instructed you to apply migrations by pasting SQL into a supabase.com dashboard. Two unreferenced scripts printed the same instruction — one handed out a psql string against pooler.supabase.com — and the Supabase CLI's .temp/ cache holding the old project ref was committed, twice, once nested under supabase/migrations/.

That is not stale clutter. It is the outage. A wrong pointer to a real-looking place is worse than no pointer: no pointer makes someone ask, a plausible one makes them assume it was handled. Nobody pasted anything, the eleven migrations were never applied, and /api/health served PGRST205 for months while every deploy went green.

The doc even contradicted the database: it listed 004_extensions and 005_optimizations as "to apply manually", while both are recorded applied in the ledger.

What changed

  • docs/SUPABASE_SETUP.md rewritten, 280 lines → 100. Self-hosted on bitbaum at supabase.orangecat.ch; our tables in the botsmann schema because one database backs several apps and public is orangecat's; migrations applied automatically on deploy by fleetcrown's apply-schema.sh against botsmann._deploy_schema_history — forward-only, one transaction, refuses destructive statements. Nothing is pasted anywhere.
  • Deleted scripts/run-migration-009.ts, scripts/apply-optimizations.mjs (both unreferenced, both hosted-era).
  • Deleted supabase/.temp/ and its nested duplicate; now gitignored.
  • Fixed hosted pointers in .env.example, lib/supabase.ts, 001_initial_schema.sql, and an ops "Useful Links" block that still listed a Vercel dashboard.
  • Added scripts/ci/no-hosted-supabase.sh, wired into verify.

The gate

Fixing today's copies only clears today's copies. check:selfhost fails on supabase.com/dashboard, app.supabase.com, pooler URLs and real project refs; allows supabase.com/docs, since the product documentation is still correct for us; exempts docs/archive/ so history can stay honest.

Proven to fail before shipping: it catches an injected dashboard link and an injected project ref, and leaves the your-project.supabase.co placeholder alone.

Verification

npm run verify green end to end — prettier, eslint, tsc, check:selfhost, 240 tests passed, next build clean.

Facts checked against production, not memory: ledger holds 11 applied tags, the botsmann schema holds 13 tables, supabase.orangecat.ch/ returns 401 behind Kong basic auth, and PostgREST answers PGRST205 on the default public profile but 200 with Accept-Profile: botsmann.

Follow-up (not in this PR)

The same sweep is owed on the rest of the fleet — printcraft is the other supabase:<schema> app. This gate is repo-local by design; a fleetcrown-wide version would be the better home.

The schema fix landed in #138, but the repo still told you to operate a
Supabase we do not have. docs/SUPABASE_SETUP.md opened with "Completed Setup"
for a hosted project jkjmhtirxwhljpkcfxqe.supabase.co and said to apply
migrations by pasting SQL into a supabase.com dashboard. Two unreferenced
scripts printed the same instruction, one handing out a psql string against
pooler.supabase.com, and the CLI's .temp cache with the old project ref was
committed — twice, once nested under supabase/migrations/.

That is not stale clutter, it is the outage. A wrong pointer to a real-looking
place is worse than no pointer: no pointer makes someone ask, a plausible one
makes them assume it was handled. Nobody pasted anything, the eleven migrations
were never applied, and /api/health served PGRST205 for months while every
deploy went green.

So the doc now describes what is actually true — self-hosted on bitbaum at
supabase.orangecat.ch, our tables in the `botsmann` schema because one database
backs several apps and `public` is orangecat's, and migrations applied
automatically on deploy by fleetcrown's apply-schema.sh against the
botsmann._deploy_schema_history ledger. Nothing is pasted anywhere. 280 lines
became 100.

Fixing today's copies only clears today's copies, so check:selfhost joins
verify: it fails on supabase.com/dashboard, app.supabase.com, pooler URLs and
real project refs, allows supabase.com/docs because the product documentation
is still correct for us, and exempts docs/archive/ so history can stay honest.
Proven to fail before shipping — it catches an injected dashboard link and a
project ref, and leaves the your-project.supabase.co placeholder alone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018waGt1ieA9TjpscqrbrnGb
@github-actions
github-actions Bot merged commit 20ed465 into main Aug 28, 2026
1 check passed
@github-actions
github-actions Bot deleted the chore/self-hosted-db-docs branch August 28, 2026 08:08
catomean added a commit to bitbaum/orangecat that referenced this pull request Aug 28, 2026
The managed Supabase Cloud project was decommissioned in 2026-06 — this repo
documents that in docs/operations/DECOMMISSION-CLOUD.md and marks the retired
host in next.config.js. But .env.example still opened with

  # Get from: https://supabase.com/dashboard/project/[project]/settings/api

and gave the URL as a hosted placeholder. That is the first file anyone opens
when setting the app up, and it sends them to a control plane we do not have.

Not a cosmetic fix. The same shape took botsmann down: its setup doc described
a hosted project in the present tense, so its eleven migrations were never
applied and /api/health served PGRST205 for months while every deploy went
green (bitbaum/botsmann#143). A wrong pointer to a real-looking place is worse
than no pointer — no pointer makes someone ask, a plausible one makes them
assume it was handled.

Found by a fleet-wide sweep for hosted-Supabase references; this was the last
live instruction left in the fleet.


Claude-Session: https://claude.ai/code/session_018waGt1ieA9TjpscqrbrnGb

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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