feat: Schema rename for @pgpmjs/core (rename/develop consolidation) #551
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
Updates hardcoded PostgreSQL schema names in the pgpm export functionality to match the schema rename in constructive-db PR #216:
collections_public→metaschema_public(database metadata tables)meta_public→services_public(service tables like apis, sites, domains)rls_moduleanduser_auth_module→metaschema_modules_public(module configuration tables)Also updates the default schemas array in
get-graphql-schema.tsto use the new schema names.This is a breaking change that must be coordinated with the constructive-db rename.
Files changed:
pgpm/cli/src/commands/export.ts- SQL queries for database/schema selectionpgpm/core/src/export/export-meta.ts- Table config and SQL queries for metadata exportpgpm/core/src/export/export-migrations.ts- SQL queries and comments in migration exportpgpm/core/__tests__/export/export-flow.test.ts- Test fixtures updated to use new schema namespgpm/core/__tests__/export/export-meta.test.ts- Test assertions updated for new schema namespackages/cli/src/commands/get-graphql-schema.ts- Default schemas array updated__fixtures__/output/- Schema fixture files renamed andmodules_public.tsremovedUpdates since last revision
rls_moduleanduser_auth_moduleto usemetaschema_modules_publicschema (matching constructive-db PR [DONT MERGE] change listModules #216)get-graphql-schema.tsdefault schemas: removeddashboard_public, addedmetaschema_modules_publicexport-flow.test.tsto createmetaschema_modules_publicschema and move module tables thereexport-meta.test.tsto separate module tables into their own test sectionReview & Testing Checklist for Human
pg-astfile changes (version 1.30.2 → 1.30.4 inasts.tsandwrapped.ts) are intentional - these are auto-generated files and the version bump appears unrelated to the schema rename. Consider reverting if accidental.metaschema_modules_publicschema exists in target database before deploying (created by constructive-db PR [DONT MERGE] change listModules #216)grep -r "collections_public\|meta_public\|dashboard_public" pgpm/ packages/cli/Recommended test plan:
pgpm exportagainst the test database to verify queries work with new schema namesmetaschema_public,services_public,metaschema_modules_public)Notes
This PR consolidates the schema rename changes for the
rename/developbranch. Part of the massive schema rename effort documented indocs/plan/NAMING-PROPOSAL.mdin constructive-db.Link to Devin run: https://app.devin.ai/sessions/218e681281f94c7b8c18e5a110f5f995
Requested by: Dan Lynch (@pyramation)