feat(export): drive meta export table list from generated manifest#1362
Merged
Conversation
META_TABLE_ORDER and META_TABLE_CONFIG are now built from meta-export-tables.json, generated by constructive-db from the live database and propagated via constructive-hub's schema-propagation workflow. Hand-authored behavior lives in META_TABLE_OVERRIDES. Both the SQL and GraphQL export flows iterate the same manifest.
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:
|
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
Replaces the hand-maintained
META_TABLE_ORDER/META_TABLE_CONFIGallowlists in@pgpmjs/exportwith a generated manifest, eliminating the drift that required one-off PRs like #1361.src/meta-export-tables.json(100 tables) is generated by constructive-db from the live database (constructive-io/constructive-db#2103) and propagated here by constructive-hub's schema-propagation workflow (constructive-io/constructive-hub#577). Already FK-topo-sorted.export-utils.ts:META_TABLE_OVERRIDES(fieldconflictDoNothing,sites/apiscolumnDefaults,sites/apps/site_metadataimage/url typeOverrides,i18n_modulegqlTypeName).export-meta.tsandexport-graphql-meta.tsnow iterateMETA_TABLE_ORDERinstead of ~95 hardcodedqueryAndParsecalls each (databasekeyed byid, everything else bydatabase_id; GraphQL flow batches per schema group). Dynamic field discovery and missing-table skip behavior unchanged.Newly exported tables (previously silently dropped):
composite_type,enum,view,view_grant,view_rule,view_table,partition,embedding_chunks,db_preset_module,principal_auth_module,resource_module. Stale entries that don't exist in constructive-db drop out (rls_function,levels_module,field_module,table_module,uuid_module,api_extensions). Runtime-only tables are blacklisted at generation time (blueprint,blueprint_construction,database_provision_module,db_pool,database_transfer). Note:integration_providers_moduleis not in the manifest yet because its table hasn't landed in constructive-db main; it will appear automatically once it does.Tests updated to match: parity tests validate both flows iterate the manifest, and the boolean/int cross-flow parity case was repointed from the removed
rls_functiontopolicy. All 142 export tests pass.Link to Devin session: https://app.devin.ai/sessions/fa0bd53e497742d2ab69753d3a7b3f4c
Requested by: @pyramation