From dd220598ca22d934208832c041061587d055d81a Mon Sep 17 00:00:00 2001 From: The Dogfather <20+gb_dogfather@noreply.git.farh.net> Date: Sun, 31 May 2026 23:09:36 +0000 Subject: [PATCH 1/2] fix: add missing coat_type enum values (GRO-1971) (#118) --- UAT_PLAYBOOK.md | 1 + .../db/migrations/0035_add_missing_coat_type_values.sql | 9 +++++++++ packages/db/migrations/meta/_journal.json | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 packages/db/migrations/0035_add_missing_coat_type_values.sql diff --git a/UAT_PLAYBOOK.md b/UAT_PLAYBOOK.md index a458219..3b6ed03 100644 --- a/UAT_PLAYBOOK.md +++ b/UAT_PLAYBOOK.md @@ -116,6 +116,7 @@ GroomBook API is a Hono-based REST service (TypeScript/Node.js) powering the pet | TC-API-3.24 | Verify UAT test pet Delta has skin alert | GET /api/pets/{id} where name = "TestRocky" (pet for uat-delta@groombook.dev) | medicalAlerts includes an entry with type: "skin" | | 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` | ### 4.4 Appointment Scheduling diff --git a/packages/db/migrations/0035_add_missing_coat_type_values.sql b/packages/db/migrations/0035_add_missing_coat_type_values.sql new file mode 100644 index 0000000..3b7a2d3 --- /dev/null +++ b/packages/db/migrations/0035_add_missing_coat_type_values.sql @@ -0,0 +1,9 @@ +-- Migration: 0035_add_missing_coat_type_values.sql +-- Adds missing values to coat_type enum that seed.ts requires but which were +-- omitted from the 0031_buffer_rules.sql CREATE TYPE statement (migration drift). +-- 0031 created: 'smooth', 'double', 'wire', 'curly', 'long', 'hairless' +-- Missing (from schema.ts coatTypeEnum): 'short', 'medium', 'silky' + +ALTER TYPE "coat_type" ADD VALUE IF NOT EXISTS 'short'; +ALTER TYPE "coat_type" ADD VALUE IF NOT EXISTS 'medium'; +ALTER TYPE "coat_type" ADD VALUE IF NOT EXISTS 'silky'; \ No newline at end of file diff --git a/packages/db/migrations/meta/_journal.json b/packages/db/migrations/meta/_journal.json index 58d27a7..5009d34 100644 --- a/packages/db/migrations/meta/_journal.json +++ b/packages/db/migrations/meta/_journal.json @@ -250,8 +250,8 @@ { "idx": 35, "version": "7", - "when": 1751140800000, - "tag": "0035_add_short_to_coat_type_enum", + "when": 1751480000000, + "tag": "0035_add_missing_coat_type_values", "breakpoints": true } ] -- 2.52.0 From 82e3807a6ae934d6bd7bb9b792d611de5ce3cd4c Mon Sep 17 00:00:00 2001 From: Flea Flicker Date: Sun, 31 May 2026 23:11:39 +0000 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20rename=200035=E2=86=920036=20to=20av?= =?UTF-8?q?oid=20conflicting=20migration=20number=20(GRO-1971)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migrations/0036_add_missing_coat_type_values.sql | 9 +++++++++ packages/db/migrations/meta/_journal.json | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 packages/db/migrations/0036_add_missing_coat_type_values.sql diff --git a/packages/db/migrations/0036_add_missing_coat_type_values.sql b/packages/db/migrations/0036_add_missing_coat_type_values.sql new file mode 100644 index 0000000..026c5ef --- /dev/null +++ b/packages/db/migrations/0036_add_missing_coat_type_values.sql @@ -0,0 +1,9 @@ +-- Migration: 0036_add_missing_coat_type_values.sql +-- Adds missing values to coat_type enum that seed.ts requires but which were +-- omitted from the 0031_buffer_rules.sql CREATE TYPE statement (migration drift). +-- 0031 created: 'smooth', 'double', 'wire', 'curly', 'long', 'hairless' +-- Missing (from schema.ts coatTypeEnum): 'short', 'medium', 'silky' + +ALTER TYPE "coat_type" ADD VALUE IF NOT EXISTS 'short'; +ALTER TYPE "coat_type" ADD VALUE IF NOT EXISTS 'medium'; +ALTER TYPE "coat_type" ADD VALUE IF NOT EXISTS 'silky'; \ No newline at end of file diff --git a/packages/db/migrations/meta/_journal.json b/packages/db/migrations/meta/_journal.json index 5009d34..1c7c56a 100644 --- a/packages/db/migrations/meta/_journal.json +++ b/packages/db/migrations/meta/_journal.json @@ -248,10 +248,10 @@ "breakpoints": true }, { - "idx": 35, + "idx": 36, "version": "7", "when": 1751480000000, - "tag": "0035_add_missing_coat_type_values", + "tag": "0036_add_missing_coat_type_values", "breakpoints": true } ] -- 2.52.0