Compare commits

...

2 Commits

Author SHA1 Message Date
Flea Flicker b3b2113daa fix(db): add missing extended pet profile fields to buildPet factory
CI / Lint & Typecheck (pull_request) Successful in 9s
CI / Test (pull_request) Successful in 9s
CI / Build & Push Docker Images (pull_request) Successful in 47s
Lint Roller (QA) flagged that buildPet in factories.ts was missing the
4 fields added to the pets table schema, causing TS2739 in the Docker
build job (run 1701, job 3717).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 18:31:52 +00:00
Flea Flicker 8c184dddbd fix(schema): add missing extended pet profile fields to packages/db
CI / Test (pull_request) Successful in 10s
CI / Lint & Typecheck (pull_request) Successful in 12s
CI / Build & Push Docker Images (pull_request) Failing after 24s
Add temperamentScore, temperamentFlags, medicalAlerts, and preferredCuts
to the pets table in packages/db/src/schema.ts to match the API schema.

These columns already exist in the database via migration
0030_extended_pet_profile.sql (confirmed by GRO-1748).

Refs: GRO-1752

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 18:19:25 +00:00
2 changed files with 9 additions and 0 deletions
+4
View File
@@ -105,6 +105,10 @@ export function buildPet(overrides: Partial<PetRow> & { clientId: string }): Pet
photoKey: null,
photoUploadedAt: null,
image: null,
temperamentScore: null,
temperamentFlags: [],
medicalAlerts: [],
preferredCuts: [],
createdAt: new Date("2025-01-01T00:00:00Z"),
updatedAt: new Date("2025-01-01T00:00:00Z"),
};
+5
View File
@@ -11,6 +11,7 @@ import {
unique,
uuid,
} from "drizzle-orm/pg-core";
import type { MedicalAlert } from "@groombook/types";
// ─── Enums ────────────────────────────────────────────────────────────────────
@@ -164,6 +165,10 @@ export const pets = pgTable(
specialCareNotes: text("special_care_notes"),
coatType: coatTypeEnum("coat_type"),
petSizeCategory: petSizeCategoryEnum("pet_size_category"),
temperamentScore: integer("temperament_score"),
temperamentFlags: jsonb("temperament_flags").$type<string[]>().default([]),
medicalAlerts: jsonb("medical_alerts").$type<MedicalAlert[]>().default([]),
preferredCuts: jsonb("preferred_cuts").$type<string[]>().default([]),
customFields: jsonb("custom_fields").$type<Record<string, string>>().notNull().default({}),
photoKey: text("photo_key"),
photoUploadedAt: timestamp("photo_uploaded_at"),