From a9bac033fda02de9a1805a70af07fe28958e2f6e Mon Sep 17 00:00:00 2001 From: Flea Flicker <22+gb_flea@noreply.git.farh.net> Date: Mon, 1 Jun 2026 13:50:16 +0000 Subject: [PATCH 1/2] docs(UAT_PLAYBOOK): add TC-API-3.28 for pet_size_category enum (GRO-1999) (#127) --- UAT_PLAYBOOK.md | 1 + 1 file changed, 1 insertion(+) diff --git a/UAT_PLAYBOOK.md b/UAT_PLAYBOOK.md index 1c4243f..c5bdf04 100644 --- a/UAT_PLAYBOOK.md +++ b/UAT_PLAYBOOK.md @@ -119,6 +119,7 @@ GroomBook API is a Hono-based REST service (TypeScript/Node.js) powering the pet | TC-API-3.25 | Verify 30+ total pets in UAT DB | GET /api/pets then count total | 30+ pets returned (UAT seed creates 500 random-pool + 5 UAT test clients + 2 UAT customer = 507 total) | | TC-API-3.26 | Verify 25-35% medicalAlerts distribution | GET /api/pets (first 30 pets), count how many have non-empty medicalAlerts | Ratio is 25-35% (seed uses rand() < 0.3 for ~30% distribution) | | TC-API-3.27 | Verify coat_type enum has all seed values | After UAT seed completes, inspect the coat_type enum on the UAT DB — it must contain: short, medium, long, double, wire, silky, curly, hairless | UAT seed jobs (`reset-demo-data`, `seed-test-data`) complete 1/1 with no `enum_in` error; coat_type includes all 8 values used by seed.ts `coatTypePool` | +| TC-API-3.28 | Verify pet_size_category enum has all seed values | After UAT seed completes, inspect the pet_size_category enum on the UAT DB — it must contain: small, medium, large, extra_large | UAT seed jobs (`reset-demo-data`, `seed-test-data`) complete 1/1 with no `enum_in` error; pet_size_category includes all 4 values used by seed.ts `petSizeCategoryPool` (regression for GRO-1999, mirrors TC-API-3.27) | ### 4.4 Appointment Scheduling From 423d4bf72d590091cdecdf00fe6064432c3abc11 Mon Sep 17 00:00:00 2001 From: Paperclip Date: Mon, 1 Jun 2026 14:41:18 +0000 Subject: [PATCH 2/2] fix(db): register extra_large via migration 0038 (GRO-1999) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GRO-1979 added 0037_add_extra_large_to_pet_size_category with a journal 'when' of 1751500000000 — below the 0033 high-water mark (1779500000000) on existing UAT/persistent DBs. Drizzle only applies a migration when its journal.when is strictly greater than max(applied created_at), so 0037 was silently skipped, leaving pet_size_category without 'extra_large' and crashing the UAT seed-test-data job (22P02 enum error). This adds 0038 with a monotonic 'when' (1780000000000) so it applies on both existing UAT/persistent DBs and fresh DBs. Statement is idempotent (ADD VALUE IF NOT EXISTS) and a single auto-commit DDL (ADD VALUE cannot run inside a transaction block). Do not modify 0033/0034/0036/0037 — re-registering extra_large is correct since the drizzle PetSizeCategory type and seed.ts both use that value. GRO-2004 Co-Authored-By: Paperclip --- .../0038_register_extra_large_pet_size_category.sql | 4 ++++ packages/db/migrations/meta/_journal.json | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 packages/db/migrations/0038_register_extra_large_pet_size_category.sql diff --git a/packages/db/migrations/0038_register_extra_large_pet_size_category.sql b/packages/db/migrations/0038_register_extra_large_pet_size_category.sql new file mode 100644 index 0000000..e80fe7f --- /dev/null +++ b/packages/db/migrations/0038_register_extra_large_pet_size_category.sql @@ -0,0 +1,4 @@ +-- GRO-1999: 0037 was skipped on existing DBs due to a below-high-water-mark +-- journal timestamp. Re-register extra_large with a monotonic timestamp so +-- the existing UAT/persistent DBs apply it. Idempotent. +ALTER TYPE "pet_size_category" ADD VALUE IF NOT EXISTS 'extra_large'; diff --git a/packages/db/migrations/meta/_journal.json b/packages/db/migrations/meta/_journal.json index bf6fd92..0645748 100644 --- a/packages/db/migrations/meta/_journal.json +++ b/packages/db/migrations/meta/_journal.json @@ -260,6 +260,13 @@ "when": 1751500000000, "tag": "0037_add_extra_large_to_pet_size_category", "breakpoints": true + }, + { + "idx": 38, + "version": "7", + "when": 1780000000000, + "tag": "0038_register_extra_large_pet_size_category", + "breakpoints": true } ] }