Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

test(infra): use the core uuid function in the optional-table spec

Yudhi Armyndharisdac5be17f1b2
diff --git a/src/modules/infra/infra-data.optional-tables.pg.spec.ts b/src/modules/infra/infra-data.optional-tables.pg.spec.ts
index a020e70ab..c9d7c0da4 100644
--- a/src/modules/infra/infra-data.optional-tables.pg.spec.ts
+++ b/src/modules/infra/infra-data.optional-tables.pg.spec.ts
@@ -93,6 +93,9 @@ describePostgres('PostgreSQL restore tolerates absent optional archive tables',
...options,
schema,
// Only the scratch schema: a table dropped from it must read as absent, not resolve to one in public.
+ // gen_random_uuid() is core since PostgreSQL 13; uuid_generate_v4() lives in an extension that an earlier spec may
+ // have installed in public, which this search_path no longer reaches.
+ uuidExtension: 'pgcrypto' as const,
extra: { ...postgresUtcExtra(), options: `-c search_path=${schema}` },
entities,
synchronize: true,