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).
Before
Section titled “Before”- 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 --shortprints nothing.
1 · The branch
Section titled “1 · The branch”The migration files were edited in place (D11), so the database is rebuilt, never migrated.
git fetch origin <PACK_T_BRANCH>git switch <PACK_T_BRANCH>pnpm supabase db reset2 · Every test
Section titled “2 · Every test”pnpm supabase test db3 · The types and the reference pages from this schema
Section titled “3 · The types and the reference pages from this schema”pnpm db:typespnpm docs:referencegit status --short4 · apps/web still typechecks
Section titled “4 · apps/web still typechecks”pnpm typecheckExpect
Section titled “Expect”- Block 1: "Finished supabase db reset".
- Block 2:
All tests successful.,Files=16, Tests=415andResult: PASS. Pack T's tests are the 22 in47_claim_photos_v1_files.test.sql, whose descriptions startR-ASR-06toR-ASR-12,R-INSP-15andR-STO-14toR-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.
git diff --stat origin/<PACK_T_BRANCH>Prints nothing.
If it fails
Section titled “If it fails”- A test fails: paste the
not okline 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 --statand the first lines ofgit difffor 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.