feat(export): explicit excludeCategories filtering in exportMigrations#1399
Open
pyramation wants to merge 2 commits into
Open
feat(export): explicit excludeCategories filtering in exportMigrations#1399pyramation wants to merge 2 commits into
pyramation wants to merge 2 commits into
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Adds category to the migrate-client schema/ORM (SqlAction field, filter, orderBy) and filters sql_actions server-side in exportGraphQL via or: [category isNull, category notIn excludeCategories], keeping null-category rows. CLI now passes --exclude-categories in both modes.
devin-ai-integration
Bot
force-pushed
the
feat/export-exclude-categories
branch
from
July 21, 2026 00:40
445e7a4 to
89fcfbd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Makes
excludeCategoriesa real, first-class export filter in both export modes, replacing the inert cross-connectionexport.exclude_categoriesGUC approach.SQL mode (
exportMigrations/exportMigrationsToDisk): newexcludeCategories?: string[]option filters directly in the exporter query (parameterized, null-preserving, deterministic):Also removes an incorrect
pgPool.end()on the cached pool fromgetPgPool().GraphQL mode (
exportGraphQL): the migrate-client schema/ORM previously didn't exposecategoryat all, so the GraphQL path couldn't filter. This PR:categorytosdk/migrate-client/schemas/migrate.graphql(SqlAction,SqlActionFilter,SqlActionOrderBy) and regenerates the ORM clientcategoryand filters server-side in thesqlAction.findManywhere-clause:CLI:
pgpm export --exclude-categories security,permissions,auth,membershipsnow works in both SQL and GraphQL modes.Behavior notes: omitted/empty
excludeCategoriespreserves the original queries exactly;category IS NULLrows are always kept; ordering staysID_ASCwith existing pagination.Testing
pgpm/exportintegration tests extended with acategory='security'action: excluded from plan/deploy files when filtered, retained when not — 146 tests passing.migrate-client,@pgpmjs/export,pgpmCLI build clean.Link to Devin session: https://app.devin.ai/sessions/9ad75ab0ed7e412f9339213390ddf29a
Requested by: @pyramation