Skip to content

BE-DP-15 · Before the merge: claim photos, receipts and files from v1, their tests and the generated files

ID BE-DP-15 · Level L0 · Pack Pack T · The tables the photo copy fills · Run order before row 6's pack (#262), before pack T's pull request is merged · Issue #251

On pack T's branch, every pgTAP test passes on your Mac's local stack (415 in 16 files on main's base), and the generated files match its schema: packages/db-types and the reference pages are already on the branch, regenerated by pnpm db:types and pnpm docs:reference on the Backend Engineer's local stack (D33), and this step proves your stack writes the same. The types are only ever written by pnpm db:types, never by hand (D22).

  • Pack T's pull request is open, names #251, and its checks are green. Its branch is named in the pull request; it stands for <PACK_T_BRANCH> below.
  • You are in ~/opleet-v2/opleet, and git status --short prints nothing.

The migration files were edited in place (D11), so the database is rebuilt, never migrated.

Terminal window
git fetch origin <PACK_T_BRANCH>
git switch <PACK_T_BRANCH>
pnpm supabase db reset
Terminal window
pnpm supabase test db

3 · The types and the reference pages from this schema

Section titled “3 · The types and the reference pages from this schema”
Terminal window
pnpm db:types
pnpm docs:reference
git status --short
Terminal window
pnpm typecheck
  • Block 1: "Finished supabase db reset".
  • Block 2: All tests successful., Files=16, Tests=415 and Result: PASS. Pack T's tests are the 22 in 47_claim_photos_v1_files.test.sql, whose descriptions start R-ASR-06 to R-ASR-12, R-INSP-15 and R-STO-14 to R-STO-18. If other packs merged first, the counts are higher by their tests.
  • Block 3: nothing listed by git status --short.
  • Block 4: no error.
Terminal window
git diff --stat origin/<PACK_T_BRANCH>

Prints nothing.

  • A test fails: paste the not ok line and the lines under it that start with # into #251. The test's description starts with the rule it proves. Don't edit the test.
  • Block 3 lists a file: your CLI or stack differs from the Backend Engineer's. Paste git diff --stat and the first lines of git diff for that file into #251, and don't commit it; the database check in CI decides which is right.
  • Block 4 fails: paste the errors into #251.

git switch main and pnpm supabase db reset put your local database back on main's schema. Nothing here touches staging or production.

Log each run as a comment on #251: date · who · result · notes, with the last lines of block 2 and what block 3 printed.