From e5755ecb10c7b7b9dd3202d925878eca0719329c Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Mon, 16 Mar 2026 23:40:42 +0000 Subject: [PATCH 1/3] feat: add uuidv7 to SQL expression validator, remove pgpm-uuid references - Add 'uuidv7' to DEFAULT_ALLOWED_FUNCTIONS in SQL expression validator - Update validator tests for new function count (9 -> 10) - Remove 'pgpm-uuid' from DB_REQUIRED_EXTENSIONS in export-migrations - Remove 'pgpm-uuid' from PGPM_MODULE_MAP in modules Part of PG18 uuidv7() migration (constructive-db#589) --- .../__tests__/validator.test.ts | 5 +++-- graphile/graphile-sql-expression-validator/src/validator.ts | 1 + pgpm/core/src/export/export-migrations.ts | 1 - pgpm/core/src/modules/modules.ts | 3 +-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/graphile/graphile-sql-expression-validator/__tests__/validator.test.ts b/graphile/graphile-sql-expression-validator/__tests__/validator.test.ts index d41a4fad3..6d3a26fe4 100644 --- a/graphile/graphile-sql-expression-validator/__tests__/validator.test.ts +++ b/graphile/graphile-sql-expression-validator/__tests__/validator.test.ts @@ -10,6 +10,7 @@ describe('DEFAULT_ALLOWED_FUNCTIONS', () => { expect(DEFAULT_ALLOWED_FUNCTIONS).toEqual([ 'uuid_generate_v4', 'gen_random_uuid', + 'uuidv7', 'now', 'clock_timestamp', 'statement_timestamp', @@ -20,8 +21,8 @@ describe('DEFAULT_ALLOWED_FUNCTIONS', () => { ]); }); - it('should have exactly 9 functions', () => { - expect(DEFAULT_ALLOWED_FUNCTIONS).toHaveLength(9); + it('should have exactly 10 functions', () => { + expect(DEFAULT_ALLOWED_FUNCTIONS).toHaveLength(10); }); it('should NOT contain setseed (makes random() predictable)', () => { diff --git a/graphile/graphile-sql-expression-validator/src/validator.ts b/graphile/graphile-sql-expression-validator/src/validator.ts index 60216c7be..f6cb344d3 100644 --- a/graphile/graphile-sql-expression-validator/src/validator.ts +++ b/graphile/graphile-sql-expression-validator/src/validator.ts @@ -64,6 +64,7 @@ interface AstNodeValidationResult { export const DEFAULT_ALLOWED_FUNCTIONS = [ 'uuid_generate_v4', 'gen_random_uuid', + 'uuidv7', 'now', 'clock_timestamp', 'statement_timestamp', diff --git a/pgpm/core/src/export/export-migrations.ts b/pgpm/core/src/export/export-migrations.ts index cde04e545..6a54356a3 100644 --- a/pgpm/core/src/export/export-migrations.ts +++ b/pgpm/core/src/export/export-migrations.ts @@ -29,7 +29,6 @@ const DB_REQUIRED_EXTENSIONS = [ 'vector', 'metaschema-schema', 'pgpm-inflection', - 'pgpm-uuid', 'pgpm-utils', 'pgpm-database-jobs', 'pgpm-jwt-claims', diff --git a/pgpm/core/src/modules/modules.ts b/pgpm/core/src/modules/modules.ts index 0a266f314..e6319f8dc 100644 --- a/pgpm/core/src/modules/modules.ts +++ b/pgpm/core/src/modules/modules.ts @@ -19,8 +19,7 @@ export const PGPM_MODULE_MAP: Record = { 'pgpm-stamps': '@pgpm/stamps', 'pgpm-totp': '@pgpm/totp', 'pgpm-types': '@pgpm/types', - 'pgpm-utils': '@pgpm/utils', - 'pgpm-uuid': '@pgpm/uuid' + 'pgpm-utils': '@pgpm/utils' }; /** From 97cec1511f02472ad6d6a30f369e061aac74d22b Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Tue, 17 Mar 2026 00:02:06 +0000 Subject: [PATCH 2/3] chore: upgrade docker-compose postgres-plus image to :18 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index c1046ddeb..620b56017 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ services: postgres: container_name: postgres - image: ghcr.io/constructive-io/docker/postgres-plus:17 + image: ghcr.io/constructive-io/docker/postgres-plus:18 environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=password From cd8bbaf1a43afab50a63a0a419be060a20a9151f Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Tue, 17 Mar 2026 00:58:30 +0000 Subject: [PATCH 3/3] fix: use public docker.io image in docker-compose for local dev docker-compose.yml is for local development, so it should use docker.io/constructiveio/postgres-plus:18 (publicly accessible) instead of ghcr.io (requires GitHub keys). --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 620b56017..c2cd70aa9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ services: postgres: container_name: postgres - image: ghcr.io/constructive-io/docker/postgres-plus:18 + image: docker.io/constructiveio/postgres-plus:18 environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=password