BE-M0-18 · Operations: inspections, work orders, claims, the gate and ETLE
ID BE-M0-18 · Level L0 · Pack Pack B · Schema V13, domain by domain · Run order row 19 · Issue #11
The operations tables, with child rows in their car's pool, one open work order per car and partner garages only, pass their tests on the local stack; committed.
Before
Section titled “Before”- BE-M0-17 is Done. You are on the branch supabase/schema-v13 in ~/opleet-v2/opleet, git status --short prints nothing, and the stack is running.
1 · Copy this step's files in
Section titled “1 · Copy this step's files in”cp -R ~/opleet-v2/packs/be-pack-b/BE-M0-18/. .git status --short2 · Rebuild the local database from every migration, then run every test
Section titled “2 · Rebuild the local database from every migration, then run every test”pnpm supabase db resetpnpm supabase test db3 · Commit
Section titled “3 · Commit”git add supabasegit commit -m "feat(supabase): inspections, work orders, claims, gate and ETLE"Expect
Section titled “Expect”- Block 1:
?? supabase/migrations/20261006000700_operations.sqland?? supabase/tests/database/18_operations.test.sql. - Block 2: db reset applies 20261006000700_operations.sql last and ends with “Finished supabase db reset”; test db ends with “All tests successful.”, “Files=7, Tests=126” and “Result: PASS”.
- Block 3: the commit line with 2 files changed.
pnpm supabase migration list --localgit log --oneline -1Expect 20261006000700 in both columns as the last row, then “feat(supabase): inspections, work orders, claims, gate and ETLE”.
If it fails
Section titled “If it fails”- 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.
Not committed yet: git clean -fd supabase/migrations supabase/tests, then pnpm supabase db reset. Committed: git reset --hard HEAD~1, then pnpm supabase db reset. Nothing has been pushed; the earlier steps stay.
Not run yet. Log each run as a comment on #11.