Skip to content

BE-M0-12 · Foundation: extensions, the app schema, error keys and the enums

ID BE-M0-12 · Level L0 · Pack Pack B · Schema V13, domain by domain · Run order row 19 · Issue #11

The foundation migration (extensions, the app schema, the error key registry and app.refuse(), every enum) and its tests pass on the local stack; committed on the branch supabase/schema-v13.

  • Timeline row 18 (pack A) is Done, and row 14c (DOC pack A) is Done with the rule IDs filled into this pack.
  • be-pack-b.zip, rebuilt for D29 and sent in the BE chat on 2026-10-07, is in ~/Downloads. The earlier zip of that day and the draft of 2026-10-06 are withdrawn.
  • You are in ~/opleet-v2/opleet, git status --short prints nothing, and pnpm supabase status shows the stack running; if not, pnpm supabase start.

1 · Check the zip, unzip it next to the repository, and check every file in it

Section titled “1 · Check the zip, unzip it next to the repository, and check every file in it”
Terminal window
shasum -a 256 ~/Downloads/be-pack-b.zip
mkdir -p ~/opleet-v2/packs
unzip -q -o ~/Downloads/be-pack-b.zip -d ~/opleet-v2/packs
(cd ~/opleet-v2/packs/be-pack-b && shasum -a 256 -c SHA256SUMS)
Terminal window
cd ~/opleet-v2/opleet
git switch main && git pull
git switch -c supabase/schema-v13
Terminal window
cp -R ~/opleet-v2/packs/be-pack-b/BE-M0-12/. .
git status --short

4 · Rebuild the local database from every migration, then run every test

Section titled “4 · Rebuild the local database from every migration, then run every test”
Terminal window
pnpm supabase db reset
pnpm supabase test db
Terminal window
git add supabase
git commit -m "feat(supabase): foundation, error keys and the enums of schema V13"
  • Block 1: be-pack-b.zip's SHA-256 as written under Pack B, then 23 lines ending in “: OK”.
  • Block 2: “Switched to a new branch 'supabase/schema-v13'”.
  • Block 3: ?? supabase/migrations/ and ?? supabase/tests/.
  • Block 4: db reset applies 20261006000100_foundation.sql last and ends with “Finished supabase db reset”; test db ends with “All tests successful.”, “Files=1, Tests=6” and “Result: PASS”.
  • Block 5: the commit line with 2 files changed.
Terminal window
pnpm supabase migration list --local
git log --oneline -1

Expect 20261006000100 in both columns as the last row, then “feat(supabase): foundation, error keys and the enums of schema V13”.

  • The hash in block 1 differs, or a line says FAILED: the download is incomplete or isn't the final zip. Download it again; if it still differs, stop and tell the BE session.
  • db reset stops at a migration: the error names the file and the line. Paste it into the BE chat; don't edit the file.
  • test db prints “not ok”: paste every “not ok” line and the lines under it. Don't commit.
  • The stack isn't running: pnpm supabase start, then the rebuild and tests again.

Nothing has been pushed:

Terminal window
git switch main
git branch -D supabase/schema-v13
pnpm supabase db reset

The reset rebuilds the local database without pack B. ~/opleet-v2/packs can stay.

Not run yet. Log each run as a comment on #11.