feat: upstream metaschema changes from constructive-db #35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Upstreams schema changes from constructive-db to the public pgpm-modules repository. This includes new module tables, a unified
object_categoryenum type, and categorization columns across metaschema tables.metaschema-modules package:
table_module,user_profiles_module,user_settings_module,organization_settings_modulenode_typecolumn and index tofield_modulemetaschema-schema package:
object_categoryenum type ('core', 'module', 'app') replacing inlinetable_categoryandfield_categorytypestemplate→policy_typein policy tableis_publiccolumn to schema tableUpdates since last revision
metaschema-modulesto include the 4 new module tables and updated constraint countsDROP TYPE metaschema_public.field_categorysince the field table now uses the sharedobject_categorytype instead of an inline typedefault_is_approvedanddefault_is_verifiedcolumns frommemberships_modulein favor of secure-by-default approachReview & Testing Checklist for Human
template→policy_type: The policy table column rename is a breaking change for existing code referencingtemplate. Verify this aligns with constructive-db.object_categorytype must deploy before all tables that reference it. Check that the plan file correctly orders migrations.node_type_registryreferences or specific node type names (FieldSlug, DataDirectOwner, etc.) appear in the public repo.Recommended test plan: Deploy the metaschema-schema and metaschema-modules packages to a fresh PostgreSQL database and verify all tables create successfully with correct foreign key relationships.
Notes
This is part of a coordinated 3-repo update:
Requested by: Dan Lynch (@pyramation)
Link to Devin run: https://app.devin.ai/sessions/7ae0a5a06e9f4cbea02826b895676582