Skip to content

feat: sync metaschema-modules tables from constructive-db#85

Merged
pyramation merged 1 commit into
mainfrom
feat/sync-metaschema-modules-tables
Jun 11, 2026
Merged

feat: sync metaschema-modules tables from constructive-db#85
pyramation merged 1 commit into
mainfrom
feat/sync-metaschema-modules-tables

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Brings the schema-only metaschema-modules package up to date with the latest table DDL in constructive-db (the source of truth). One new module table plus four that drifted. Per the repo split, only the CREATE TABLE DDL lives here — triggers/functions stay downstream in constructive-db.

New table

  • function_invocation_module — entity-scoped function invocations + execution logs. Carries invocations_table_* / execution_logs_table_*, scope/prefix, optional entity_table_id for RLS/billing, plus policies/provisions/default_permissions. Added to pgpm.plan (after function_module) with verify_table() verify and DROP TABLE revert.

Changed tables (in-place deploy DDL edits to match constructive-db)

  • function_moduleremoved invocations_table_id, execution_logs_table_id, invocations_table_name, execution_logs_table_name and their FKs (this responsibility was extracted into the new function_invocation_module).
  • memberships_module — added permission_default_permissions_table_id, permission_default_grants_table_id (nullable).
  • merkle_store_module — added function_prefix text DEFAULT NULL (function-name prefix override).
  • notifications_module — added suppressions_table_id + FK (ON DELETE SET NULL) and its @fieldName comment.

Packaging

  • Regenerated bundle sql/metaschema-modules--0.26.3.sql--0.26.5.sql via pgpm package, aligning the drifted default_version/Makefile (control was 0.26.3 while package.json was already 0.26.5). package.json version unchanged (repo uses synchronized versioning).

Note: agent_module deploy DDL is already identical upstream — no change. The agent_chat_module verify/revert files (in neither pgpm.plan) are pre-existing orphans and left untouched.

Testing

  • pgpm test-packages --full-cycleall 26 modules pass deploy → verify → revert → deploy, including metaschema-modules (new table deploys/verifies/reverts/redeploys cleanly).
  • metaschema-modules jest suite — 8/8 pass; 4 snapshots regenerated to reflect the new table + net +5 FK constraints (function_invocation_module +6, function_module −2, notifications +1).

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

- add function_invocation_module (entity-scoped invocations + execution logs)
- function_module: drop invocation/execution-log columns (extracted to function_invocation_module)
- memberships_module: add permission_default_permissions_table_id, permission_default_grants_table_id
- merkle_store_module: add function_prefix override
- notifications_module: add suppressions_table_id + FK
- regenerate sql bundle 0.26.3 -> 0.26.5, update control/Makefile, plan entry
@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, CI, and merge conflict monitoring

@pyramation pyramation merged commit 3823f13 into main Jun 11, 2026
24 checks passed
@pyramation pyramation deleted the feat/sync-metaschema-modules-tables branch June 11, 2026 03:59
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