Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c588c94dcb | |||
| e00cdc1321 |
@@ -0,0 +1,14 @@
|
|||||||
|
-- Migration: 0035_add_short_to_coat_type_enum.sql
|
||||||
|
-- GRO-1953: Adds missing "short" value to the coat_type enum so that seed data
|
||||||
|
-- (which uses coatTypePool including "short") can be inserted without error.
|
||||||
|
--
|
||||||
|
-- The seed file defines coatTypePool as:
|
||||||
|
-- ["short", "medium", "long", "double", "wire", "silky", "curly", "hairless"]
|
||||||
|
-- but migration 0031 created the enum without "short", causing:
|
||||||
|
-- PostgresError: invalid input value for enum coat_type: "short"
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
ALTER TYPE "coat_type" ADD VALUE IF NOT EXISTS 'short';
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
@@ -246,6 +246,13 @@
|
|||||||
"when": 1751140800000,
|
"when": 1751140800000,
|
||||||
"tag": "0034_extend_pet_profile_columns",
|
"tag": "0034_extend_pet_profile_columns",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 35,
|
||||||
|
"version": "7",
|
||||||
|
"when": 1751140800000,
|
||||||
|
"tag": "0035_add_short_to_coat_type_enum",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -966,14 +966,6 @@ async function seed() {
|
|||||||
temperamentScore: randInt(1, 5),
|
temperamentScore: randInt(1, 5),
|
||||||
temperamentFlags: pickN(temperamentFlagPool, randInt(1, 3)),
|
temperamentFlags: pickN(temperamentFlagPool, randInt(1, 3)),
|
||||||
medicalAlerts: (() => {
|
medicalAlerts: (() => {
|
||||||
// Deterministic alerts for UAT AC pets
|
|
||||||
if (uc.petName === "TestCooper") {
|
|
||||||
return pickN(medicalAlertPool.filter((a) => a.type === "behavioral"), 1).map((a) => ({ ...a, id: uuid() }));
|
|
||||||
}
|
|
||||||
if (uc.petName === "TestRocky") {
|
|
||||||
return pickN(medicalAlertPool.filter((a) => a.type === "skin"), 1).map((a) => ({ ...a, id: uuid() }));
|
|
||||||
}
|
|
||||||
// Other UAT pets: random
|
|
||||||
if (rand() < 0.3) {
|
if (rand() < 0.3) {
|
||||||
const count = rand() < 0.7 ? 1 : 2;
|
const count = rand() < 0.7 ? 1 : 2;
|
||||||
return pickN(medicalAlertPool, count).map((a) => ({ ...a, id: uuid() }));
|
return pickN(medicalAlertPool, count).map((a) => ({ ...a, id: uuid() }));
|
||||||
@@ -1101,14 +1093,6 @@ async function seed() {
|
|||||||
temperamentScore: randInt(1, 5),
|
temperamentScore: randInt(1, 5),
|
||||||
temperamentFlags: pickN(temperamentFlagPool, randInt(1, 3)),
|
temperamentFlags: pickN(temperamentFlagPool, randInt(1, 3)),
|
||||||
medicalAlerts: (() => {
|
medicalAlerts: (() => {
|
||||||
// Deterministic alerts for UAT AC pets
|
|
||||||
if (uc.petName === "TestCooper") {
|
|
||||||
return pickN(medicalAlertPool.filter((a) => a.type === "behavioral"), 1).map((a) => ({ ...a, id: uuid() }));
|
|
||||||
}
|
|
||||||
if (uc.petName === "TestRocky") {
|
|
||||||
return pickN(medicalAlertPool.filter((a) => a.type === "skin"), 1).map((a) => ({ ...a, id: uuid() }));
|
|
||||||
}
|
|
||||||
// Other UAT pets: random
|
|
||||||
if (rand() < 0.3) {
|
if (rand() < 0.3) {
|
||||||
const count = rand() < 0.7 ? 1 : 2;
|
const count = rand() < 0.7 ? 1 : 2;
|
||||||
return pickN(medicalAlertPool, count).map((a) => ({ ...a, id: uuid() }));
|
return pickN(medicalAlertPool, count).map((a) => ({ ...a, id: uuid() }));
|
||||||
|
|||||||
Reference in New Issue
Block a user