fix(db): register extra_large via migration 0038 (GRO-1999)
GRO-1979 added 0037_add_extra_large_to_pet_size_category with a journal 'when' of 1751500000000 — below the 0033 high-water mark (1779500000000) on existing UAT/persistent DBs. Drizzle only applies a migration when its journal.when is strictly greater than max(applied created_at), so 0037 was silently skipped, leaving pet_size_category without 'extra_large' and crashing the UAT seed-test-data job (22P02 enum error). This adds 0038 with a monotonic 'when' (1780000000000) so it applies on both existing UAT/persistent DBs and fresh DBs. Statement is idempotent (ADD VALUE IF NOT EXISTS) and a single auto-commit DDL (ADD VALUE cannot run inside a transaction block). Do not modify 0033/0034/0036/0037 — re-registering extra_large is correct since the drizzle PetSizeCategory type and seed.ts both use that value. GRO-2004 Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
-- GRO-1999: 0037 was skipped on existing DBs due to a below-high-water-mark
|
||||
-- journal timestamp. Re-register extra_large with a monotonic timestamp so
|
||||
-- the existing UAT/persistent DBs apply it. Idempotent.
|
||||
ALTER TYPE "pet_size_category" ADD VALUE IF NOT EXISTS 'extra_large';
|
||||
@@ -260,6 +260,13 @@
|
||||
"when": 1751500000000,
|
||||
"tag": "0037_add_extra_large_to_pet_size_category",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 38,
|
||||
"version": "7",
|
||||
"when": 1780000000000,
|
||||
"tag": "0038_register_extra_large_pet_size_category",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user