Skip to content

feat: remove unused module column from metaschema_public tables#84

Merged
pyramation merged 1 commit into
mainfrom
feat/remove-metaschema-module-column
Jun 11, 2026
Merged

feat: remove unused module column from metaschema_public tables#84
pyramation merged 1 commit into
mainfrom
feat/remove-metaschema-module-column

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Removes the dead module text NULL column from the 14 metaschema_public table definitions in metaschema-schema. This column was write-only metadata with zero readers — the generators that populated it live downstream in constructive-db, so here in the upstream schema-only package it has 0 writers and 0 readers, making it a pure orphan column definition. The matching deletion already landed downstream in constructive-db#1594; this upstreams the schema-only half.

Per the repo's split (pgpm-modules = schema/table DDL only, triggers/functions live in constructive-db's metaschema), only the table DDL belongs here.

What changed

  • Drop module from 14 metaschema_public/*/table.sql DDLs:
    table, field, schema, view, index, policy, trigger, enum, composite_type, spatial_relation, and the 4 constraint tables (check_/unique_/foreign_key_/primary_key_constraint).
       category metaschema_public.object_category NOT NULL DEFAULT 'app',
    -  module text NULL,
       scope int NULL,
  • Remove module from the one verify that lists columns explicitly (view/table.sql); the other 13 use verify_table(...) which only asserts table existence:
    - ... smart_tags, category, module, scope, tags
    + ... smart_tags, category, scope, tags
  • Regenerate the sql/ bundle via pgpm package. This aligned the stale pg-extension version (control + Makefile) 0.26.3 → 0.26.5 to match the package version, and replaced metaschema-schema--0.26.3.sql with metaschema-schema--0.26.5.sql.

The 'module' value of the object_category enum and the services_public/metaschema_modules module tables are unrelated concepts and are untouched.

Verification

  • pnpm test (metaschema-schema jest): passes — package deploys cleanly without the column.
  • pgpm test-packages --full-cycle: all modules pass the deploy → verify → revert → deploy cycle, including services (which depends on metaschema-schema).
  • Repo-wide grep confirms no remaining deploy/verify/revert references to the dropped metaschema_public.*.module column.

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

The 'module text NULL' column was dead, write-only metadata on 14
metaschema_public table definitions. The downstream generators that
populated it live in constructive-db; upstream here it has zero writers
and zero readers, so it is a pure orphan column.

- Drop 'module' from the 14 metaschema_public table DDLs
- Remove 'module' from the view verify column list
- Regenerate the sql/ bundle (control + Makefile aligned 0.26.3 -> 0.26.5
  to match the package version)
@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 4198fdf into main Jun 11, 2026
24 checks passed
@pyramation pyramation deleted the feat/remove-metaschema-module-column branch June 11, 2026 04:06
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