diff --git a/packages/db/migrations/0035_add_short_to_coat_type_enum.sql b/packages/db/migrations/0035_add_short_to_coat_type_enum.sql new file mode 100644 index 0000000..26145a9 --- /dev/null +++ b/packages/db/migrations/0035_add_short_to_coat_type_enum.sql @@ -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; \ No newline at end of file diff --git a/packages/db/migrations/meta/_journal.json b/packages/db/migrations/meta/_journal.json index db9e36c..58d27a7 100644 --- a/packages/db/migrations/meta/_journal.json +++ b/packages/db/migrations/meta/_journal.json @@ -246,6 +246,13 @@ "when": 1751140800000, "tag": "0034_extend_pet_profile_columns", "breakpoints": true + }, + { + "idx": 35, + "version": "7", + "when": 1751140800000, + "tag": "0035_add_short_to_coat_type_enum", + "breakpoints": true } ] } \ No newline at end of file