diff --git a/infra/migrations/030_fix_trend_windows_id_default.sql b/infra/migrations/030_fix_trend_windows_id_default.sql new file mode 100644 index 0000000..cf84afb --- /dev/null +++ b/infra/migrations/030_fix_trend_windows_id_default.sql @@ -0,0 +1,4 @@ +-- Fix trend_windows.id default: uuid_generate_v4() requires the uuid-ossp +-- extension which may not be loaded. Switch to gen_random_uuid() which is +-- built-in to PostgreSQL 13+. +ALTER TABLE trend_windows ALTER COLUMN id SET DEFAULT gen_random_uuid();