feat: add secure_table_provision to export functionality#744
Merged
pyramation merged 1 commit intomainfrom Feb 26, 2026
Merged
Conversation
Add secure_table_provision config entry with all typed columns, queryAndParse call, and tableOrder entry for migration export.
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.
feat: add secure_table_provision to export functionality
Summary
Adds
secure_table_provisionto the pgpm export pipeline so that databases using the new table provisioning system (replacing the deprecatedtable_module) get their provision rows exported correctly.Three changes, all following the existing pattern for other
metaschema_modules_publictables:export-meta.tsconfig — newsecure_table_provisionentry with all 16 typed columns (schema_id,table_name,node_type,use_rls,node_data,grant_roles,grant_privileges,policy_type,policy_privileges,policy_role,policy_permissive,policy_data,out_fields, etc.)export-meta.tsqueryAndParse — addedSELECT * FROM metaschema_modules_public.secure_table_provision WHERE database_id = $1callexport-migrations.tstableOrder — inserted'secure_table_provision'after'table_module'The existing
table_moduleentry is left in place since it is deprecated but not yet removed.Review & Testing Checklist for Human
secure_table_provisionDDL (cross-reference withconstructive-db/pgpm-modules/metaschema-modules/deploy/.../secure_table_provision/table.sql)secure_table_provisionrows and confirm the generated SQL is correcttableOrder(aftertable_module, beforeuser_profiles_module) produces valid migration ordering —secure_table_provisionhas FK deps ondatabase,schema, andtable, all of which appear earlierNotes
Part of a broader
table_module→secure_table_provisiondeprecation effort spanning 3 repos (constructive-db, pgpm-modules, constructive).