fix(25): revise plans based on checker feedback

This commit is contained in:
2026-04-10 10:51:30 +02:00
parent d9d9532399
commit b6970c9a04
3 changed files with 22 additions and 22 deletions

View File

@@ -18,10 +18,10 @@ requirements:
must_haves:
truths:
- "globalItems table has sourceUrl, imageCredit, imageSourceUrl columns"
- "globalItems table has a unique constraint on (brand, model)"
- "upsertGlobalItem called with sourceUrl, imageCredit, imageSourceUrl returns them in the result"
- "Two upserts with the same (brand, model) return the same item id and created: false on the second call"
- "Inserting a duplicate (brand, model) updates the existing row instead of failing"
- "Bulk upsert returns accurate created vs updated counts"
- "bulkUpsertGlobalItems returns accurate created vs updated counts matching input mix"
- "Tags are synced (create-if-not-exists) when provided, left untouched when omitted"
artifacts:
- path: "src/db/schema.ts"
@@ -189,6 +189,7 @@ export const categories = pgTable("categories", {
- src/db/schema.ts contains `unique().on(table.brand, table.model)`
- A new migration SQL file exists in drizzle-pg/ directory
- `bun run db:push` exits 0
- CATL-01 manufacturer requirement satisfied by existing brand column per D-02 — no new column needed
</acceptance_criteria>
<done>globalItems table has 3 new attribution columns and a unique constraint on (brand, model), migration generated and applied</done>
</task>