Skip to content

Conversation

@pyramation
Copy link
Contributor

@pyramation pyramation commented Jan 5, 2026

refactor: rename db-meta packages to metaschema, add services package

Summary

Upstreams schema renaming changes from constructive-io/constructive-db to this repository. This is a breaking change that renames core packages and PostgreSQL schemas:

Package renames:

  • db-meta-modulesmetaschema-modules
  • db-meta-schemametaschema-schema

Schema renames:

  • collections_public / collections_privatemetaschema_public / metaschema_private
  • meta_public / meta_privatemetaschema_modules_public / services_public / services_private

New package:

  • services - Contains tables for APIs, sites, domains, apps, and site configuration (metadata, modules, themes)

Updates since last revision

  • Fixed pnpm-lock.yaml sync issues for CI
  • Updated CI workflow to use new package names
  • Fixed metaschema-schema tests to match actual table schemas (extension table has no description column; table/field use name not table_name/field_name)
  • Added jest.config.js and snapshot files to services package
  • Created revert scripts for all services package migrations (required by pgpm test-packages)
  • Fixed metaschema-modules tests to reference metaschema_modules_public schema instead of services_public
  • Added 30s timeout for slow FK query test in metaschema-modules
  • Reorganized tests for CI isolation: Services-dependent tests (complete workflow, domain registration) are now only in the services package since CI runs packages in isolation. The metaschema-schema package has a simple database creation test only.
  • Fixed Makefiles: Updated EXTENSION and DATA in both metaschema-modules and metaschema-schema Makefiles to use new names and correct SQL version (0.15.5 instead of 0.15.3)
  • Fixed missing dependency: Added @pgpm/services to metaschema-modules/package.json (required by .control file)
  • Updated documentation: Fixed all references to old db-meta-* names in README.md, MODULES.md, and package-specific READMEs
  • Updated pnpm-lock.yaml: Synced lockfile after adding @pgpm/services dependency to fix CI frozen-lockfile error

Review & Testing Checklist for Human

  • Verify Makefile SQL files exist: Confirm sql/metaschema-modules--0.15.5.sql and sql/metaschema-schema--0.15.5.sql exist in their respective package directories
  • Verify test coverage: The integration test that touches both metaschema_public and services_public tables is now only in the services package - confirm this provides adequate coverage
  • Verify services revert scripts: Revert scripts were created for CI but don't exist in constructive-db - confirm these are correct for production use
  • Check downstream impact: Any code in constructive-db or other repos that depends on the old package names (@pgpm/db-meta-modules, @pgpm/db-meta-schema) will need updates

Recommended test plan:

  1. Run pnpm install and pnpm test in the repo
  2. Deploy to a test database and verify schema creation
  3. Run make install in metaschema-modules and metaschema-schema packages to verify Makefiles work
  4. Confirm constructive-db can use these packages after the rename

Notes

This PR was created by copying the pgpm-modules/ folder from constructive-db which had already been modified with these renames. The changes were originally made in commits starting from the "vendor pgpm-modules" commit through the metaschema rename commits.

Link to Devin run: https://app.devin.ai/sessions/e6eaf10a10804d28bf10e39b7dbe6698
Requested by: Dan Lynch ([email protected]) / @pyramation

- Rename db-meta-modules to metaschema-modules
- Rename db-meta-schema to metaschema-schema
- Rename schema names: collections_public/private -> metaschema_public/private
- Rename schema names: meta_public/private -> metaschema_modules_public/services_public/services_private
- Add new services package for module registration and service configuration

Upstreamed from constructive-io/constructive-db
@devin-ai-integration
Copy link

🤖 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

Services-dependent tests (complete workflow, domain registration) are
already in the services package. This avoids CI failures since packages
are tested in isolation.
- Update metaschema-modules/Makefile: EXTENSION and DATA now use metaschema-modules--0.15.5.sql
- Update metaschema-schema/Makefile: EXTENSION and DATA now use metaschema-schema--0.15.5.sql
- Add @pgpm/services dependency to metaschema-modules/package.json (required by .control file)
- Update README.md: rename db-meta-* to metaschema-* in package list, add @pgpm/services
- Update MODULES.md: fix package paths from packages/meta/db-meta-* to packages/metaschema-*
- Update metaschema-schema/README.md: rename all references from db-meta-schema to metaschema-schema
- Update metaschema-modules/README.md: rename all references from db-meta-modules to metaschema-modules
- Update inflection/README.md: rename db-meta-schema reference to metaschema-schema
@pyramation pyramation merged commit 75552ed into main Jan 5, 2026
22 checks passed
@pyramation pyramation deleted the devin/1767592221-upstream-metaschema-rename branch January 5, 2026 08:27
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.

2 participants