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/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 58d27a7..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": 1751140800000, - "tag": "0035_add_short_to_coat_type_enum", + "when": 1751480000000, + "tag": "0036_add_missing_coat_type_values", "breakpoints": true } ]