Skip to content

chore: sync all modules from constructive-db#50

Closed
pyramation wants to merge 5 commits intomainfrom
devin/1774309277-sync-from-constructive-db
Closed

chore: sync all modules from constructive-db#50
pyramation wants to merge 5 commits intomainfrom
devin/1774309277-sync-from-constructive-db

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

@pyramation pyramation commented Mar 23, 2026

Summary

Bulk sync of all 12 pgpm-modules packages from constructive-db (private, source-of-truth repo) to the public pgpm-modules repo. The public repo had fallen behind.

Key schema changes in metaschema-modules:

  • Added fields jsonb[] column to secure_table_provision (needed by agentic-db-services provisioning SQL)
  • Changed grant_privileges type from jsonb to jsonb[]
  • Changed default PK generation from uuid_generate_v4() to uuidv7()
  • Added blueprint and blueprint_template tables with associated procedures (compute_blueprint_hash, construct_blueprint, copy_template_to_blueprint, validate_blueprint_definition)
  • Removed table_module and uuid_module
  • Added uuid-ossp to control file requires

Key schema changes in metaschema-schema:

  • Added embedding_chunks table
  • Switched PKs to uuidv7() across tables

Other changes across all packages:

  • Version bumps in .control files from 0.15.30.15.5
  • SQL function signatures reformatted to multi-line style
  • pgpm devDependency bumped to ^4.7.9
  • Updated pnpm-lock.yaml to match new dependency versions

CI infrastructure updates:

  • Docker image: pyramation/pgvector:13.3-alpine (PG 13) → constructiveio/postgres-plus:18 (PG 18) to support uuidv7()
  • PGPM_VERSION: 2.7.94.7.4
  • Both ci.yml and integration-test.yml updated

Test fixes:

  • Updated metaschema-modules snapshots to reflect new table/constraint counts (totalTables: 25→27, constraintCount adjustments)
  • Restored services package __tests__/ and revert/ files that were inadvertently removed during the sync from constructive-db (restored from main)
  • Added jest.config.js to services package (was missing, causing "Jest encountered an unexpected token" on TypeScript test files)

CI status: 22/22 checks passing ✓

Review & Testing Checklist for Human

  • Version numbers in package.json regressed from 0.19.00.15.5 across many packages (base32, database-jobs, utils, verify, etc.). The .control files go 0.15.30.15.5 which is correct, but the npm package versions going down looks wrong. Verify this is intentional and won't break consumers relying on semver.
  • grant_privileges type change (jsonbjsonb[]) in secure_table_provision is a breaking change. Existing INSERT statements using '[]'::jsonb will fail against the new jsonb[] type. Confirm all downstream consumers have been updated.
  • Removed table_module and uuid_module from metaschema-modules (deploy, revert, verify, and pgpm.plan entries). Verify no deployed databases still reference these migrations.
  • Snapshot values were updated manually (constraintCount 61798→64152, 88589→91658, totalTables 25→27). These passed in CI but should be sanity-checked — if the underlying module structure changes again, snapshots will need regenerating.
  • Services revert files were restored from main, not from constructive-db. Verify the revert SQL is still compatible with the updated deploy SQL from constructive-db.

Notes

  • This sync was triggered by agentic-db's CI failing after removing duplicate module directories — pgpm had been silently deploying from the wrong (old) directory, and the correct directory's SQL required the fields column that only existed in constructive-db's version of metaschema-modules.
  • The database-jobs control file dropped uuid-ossp from its requires while metaschema-modules added it — the dependency shifted but wasn't removed entirely.
  • The services jest.config.js was copied from metaschema-modules (uses ts-jest preset). This was needed because the test file restored from main is TypeScript but the package had no jest configuration.

Link to Devin session: https://app.devin.ai/sessions/c26111a26a9a44f891534104a809dcdb
Requested by: @pyramation

Updates all pgpm-modules packages to match the latest versions from
constructive-db. Key changes include:

metaschema-modules:
- Added 'fields' jsonb[] column to secure_table_provision
- Changed grant_privileges type from jsonb to jsonb[]
- Changed default PK generation from uuid_generate_v4() to uuidv7()
- Added blueprint/blueprint_template tables and procedures
- Removed table_module and uuid_module (no longer used)
- Added uuid-ossp to control file requires

metaschema-schema:
- Added embedding_chunks table
- Various table definition updates (uuidv7, etc.)

All other modules updated with minor version bumps, test files,
and .npmignore additions.
@devin-ai-integration
Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration devin-ai-integration Bot deleted the devin/1774309277-sync-from-constructive-db branch March 24, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant