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.
Before
Section titled “Before”- 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 statusshows 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”shasum -a 256 ~/Downloads/be-pack-b.zipmkdir -p ~/opleet-v2/packsunzip -q -o ~/Downloads/be-pack-b.zip -d ~/opleet-v2/packs(cd ~/opleet-v2/packs/be-pack-b && shasum -a 256 -c SHA256SUMS)2 · A branch for pack B
Section titled “2 · A branch for pack B”cd ~/opleet-v2/opleetgit switch main && git pullgit switch -c supabase/schema-v133 · Copy this step's files in
Section titled “3 · Copy this step's files in”cp -R ~/opleet-v2/packs/be-pack-b/BE-M0-12/. .git status --short4 · 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”pnpm supabase db resetpnpm supabase test db5 · Commit
Section titled “5 · Commit”git add supabasegit commit -m "feat(supabase): foundation, error keys and the enums of schema V13"Expect
Section titled “Expect”- 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.
pnpm supabase migration list --localgit log --oneline -1Expect 20261006000100 in both columns as the last row, then “feat(supabase): foundation, error keys and the enums of schema V13”.
If it fails
Section titled “If it fails”- 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:
git switch maingit branch -D supabase/schema-v13pnpm supabase db resetThe reset rebuilds the local database without pack B. ~/opleet-v2/packs can stay.
Not run yet. Log each run as a comment on #11.