Skip to content

Commit e5755ec

Browse files
committed
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)
1 parent 9c322f4 commit e5755ec

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

graphile/graphile-sql-expression-validator/__tests__/validator.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ describe('DEFAULT_ALLOWED_FUNCTIONS', () => {
1010
expect(DEFAULT_ALLOWED_FUNCTIONS).toEqual([
1111
'uuid_generate_v4',
1212
'gen_random_uuid',
13+
'uuidv7',
1314
'now',
1415
'clock_timestamp',
1516
'statement_timestamp',
@@ -20,8 +21,8 @@ describe('DEFAULT_ALLOWED_FUNCTIONS', () => {
2021
]);
2122
});
2223

23-
it('should have exactly 9 functions', () => {
24-
expect(DEFAULT_ALLOWED_FUNCTIONS).toHaveLength(9);
24+
it('should have exactly 10 functions', () => {
25+
expect(DEFAULT_ALLOWED_FUNCTIONS).toHaveLength(10);
2526
});
2627

2728
it('should NOT contain setseed (makes random() predictable)', () => {

graphile/graphile-sql-expression-validator/src/validator.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ interface AstNodeValidationResult {
6464
export const DEFAULT_ALLOWED_FUNCTIONS = [
6565
'uuid_generate_v4',
6666
'gen_random_uuid',
67+
'uuidv7',
6768
'now',
6869
'clock_timestamp',
6970
'statement_timestamp',

pgpm/core/src/export/export-migrations.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const DB_REQUIRED_EXTENSIONS = [
2929
'vector',
3030
'metaschema-schema',
3131
'pgpm-inflection',
32-
'pgpm-uuid',
3332
'pgpm-utils',
3433
'pgpm-database-jobs',
3534
'pgpm-jwt-claims',

pgpm/core/src/modules/modules.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ export const PGPM_MODULE_MAP: Record<string, string> = {
1919
'pgpm-stamps': '@pgpm/stamps',
2020
'pgpm-totp': '@pgpm/totp',
2121
'pgpm-types': '@pgpm/types',
22-
'pgpm-utils': '@pgpm/utils',
23-
'pgpm-uuid': '@pgpm/uuid'
22+
'pgpm-utils': '@pgpm/utils'
2423
};
2524

2625
/**

0 commit comments

Comments
 (0)