Skip to content

feat: add secure_table_provision to export functionality#744

Merged
pyramation merged 1 commit intomainfrom
devin/1772084272-add-secure-table-provision-export
Feb 26, 2026
Merged

feat: add secure_table_provision to export functionality#744
pyramation merged 1 commit intomainfrom
devin/1772084272-add-secure-table-provision-export

Conversation

@pyramation
Copy link
Contributor

feat: add secure_table_provision to export functionality

Summary

Adds secure_table_provision to the pgpm export pipeline so that databases using the new table provisioning system (replacing the deprecated table_module) get their provision rows exported correctly.

Three changes, all following the existing pattern for other metaschema_modules_public tables:

  1. export-meta.ts config — new secure_table_provision entry 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.)
  2. export-meta.ts queryAndParse — added SELECT * FROM metaschema_modules_public.secure_table_provision WHERE database_id = $1 call
  3. export-migrations.ts tableOrder — inserted 'secure_table_provision' after 'table_module'

The existing table_module entry is left in place since it is deprecated but not yet removed.

Review & Testing Checklist for Human

  • Verify the 16 field names and types in the config entry match the actual secure_table_provision DDL (cross-reference with constructive-db/pgpm-modules/metaschema-modules/deploy/.../secure_table_provision/table.sql)
  • Run an export against a database that has secure_table_provision rows and confirm the generated SQL is correct
  • Confirm placement in tableOrder (after table_module, before user_profiles_module) produces valid migration ordering — secure_table_provision has FK deps on database, schema, and table, all of which appear earlier

Notes

Part of a broader table_modulesecure_table_provision deprecation effort spanning 3 repos (constructive-db, pgpm-modules, constructive).

Add secure_table_provision config entry with all typed columns,
queryAndParse call, and tableOrder entry for migration export.
@devin-ai-integration
Copy link
Contributor

🤖 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

@pyramation pyramation merged commit 2a5aa31 into main Feb 26, 2026
43 checks passed
@pyramation pyramation deleted the devin/1772084272-add-secure-table-provision-export branch February 26, 2026 05:46
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.

1 participant