Skip to content

chore: sync schemas/tables from constructive-db (no procedures)#51

Merged
pyramation merged 3 commits intomainfrom
devin/1774317839-sync-schemas-from-constructive-db
Mar 24, 2026
Merged

chore: sync schemas/tables from constructive-db (no procedures)#51
pyramation merged 3 commits intomainfrom
devin/1774317839-sync-schemas-from-constructive-db

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

@pyramation pyramation commented Mar 24, 2026

Summary

Syncs all 20 pgpm modules from constructive-db, containing only schemas and tables (no closed-source procedures). This replaces the reverted PR #50 which accidentally included procedure files.

Key changes across modules:

  • UUID migration: uuid_generate_v4()uuidv7() in all table definitions; uuid-ossp removed from control file requires
  • Version bump: All control files 0.15.30.15.5
  • metaschema-modules: Added blueprint and blueprint_template tables; removed table_module and uuid_module tables; updated column definitions (e.g. fields, grant_privileges on secure_table_provision)
  • metaschema-schema: Added embedding_chunks table
  • services: Removed COMMENT ON CONSTRAINT ... IS E'@omit manyToMany' annotations from all tables
  • CI: Updated docker image from pyramation/pgvector:13.3-alpine to constructiveio/postgres-plus:18; pgpm 2.7.94.7.4

Updates since last revision

  • Regenerated snapshots locally against constructiveio/postgres-plus:18 — all 22 CI checks now pass
  • Updated metaschema-modules test expectations: removed table_module and uuid_module from the expected modules list and removed the table_module structure test (both tables were dropped in the constructive-db source)
  • Updated encrypted-secrets-table snapshot for uuidv7() default

Review & Testing Checklist for Human

  • Verify no closed-source procedures are included — search for procedures/compute_blueprint_hash, procedures/construct_blueprint, procedures/copy_template_to_blueprint, procedures/validate_blueprint_definition in the branch. Only faker/procedures/utils.sql (a public utility) should exist.
  • Confirm removal of table_module and uuid_module is intentional — the test file was modified to stop asserting these tables exist. Verify in constructive-db that these tables were intentionally dropped and are not expected by downstream consumers.
  • Verify @omit manyToMany comment removals in services package are intentional — these were present in the old version and removed in constructive-db. This may affect PostGraphile schema generation for downstream consumers.
  • Spot-check a few table SQL files against constructive-db source to confirm the sync is accurate and nothing was missed or corrupted.

Test Plan

  1. CI is green (22/22 unit + integration tests pass)
  2. Optionally: pgpm deploy a module locally against constructiveio/postgres-plus:18 to verify the uuidv7() migration works end-to-end
  3. Deploy metaschema-modules and verify the new blueprint/blueprint_template tables are created and the removed table_module/uuid_module tables are absent

Notes

  • The companion PR constructive-db #677 moves the 4 blueprint procedures into packages/metaschema so they stay in the private repo. After both PRs merge, pgpm-modules/ in constructive-db can be directly copied to this public repo without leaking closed-source code.
  • The services package revert SQL files were restored from main since constructive-db doesn't track them.

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

@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

…module/uuid_module, update encrypted-secrets-table snapshot
@pyramation pyramation merged commit 004db82 into main Mar 24, 2026
22 checks passed
@pyramation pyramation deleted the devin/1774317839-sync-schemas-from-constructive-db branch March 24, 2026 02:46
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