Skip to content

Commit 2a5aa31

Browse files
authored
Merge pull request #744 from constructive-io/devin/1772084272-add-secure-table-provision-export
feat: add secure_table_provision to export functionality
2 parents 00a06fc + ae91573 commit 2a5aa31

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

pgpm/core/src/export/export-meta.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,28 @@ const config: Record<string, TableConfig> = {
857857
fields: 'uuid[]'
858858
}
859859
},
860+
secure_table_provision: {
861+
schema: 'metaschema_modules_public',
862+
table: 'secure_table_provision',
863+
fields: {
864+
id: 'uuid',
865+
database_id: 'uuid',
866+
schema_id: 'uuid',
867+
table_id: 'uuid',
868+
table_name: 'text',
869+
node_type: 'text',
870+
use_rls: 'boolean',
871+
node_data: 'jsonb',
872+
grant_roles: 'text[]',
873+
grant_privileges: 'jsonb',
874+
policy_type: 'text',
875+
policy_privileges: 'text[]',
876+
policy_role: 'text',
877+
policy_permissive: 'boolean',
878+
policy_data: 'jsonb',
879+
out_fields: 'uuid[]'
880+
}
881+
},
860882
table_template_module: {
861883
schema: 'metaschema_modules_public',
862884
table: 'table_template_module',
@@ -1043,6 +1065,7 @@ export const exportMeta = async ({ opts, dbname, database_id }: ExportMetaParams
10431065
await queryAndParse('crypto_auth_module', `SELECT * FROM metaschema_modules_public.crypto_auth_module WHERE database_id = $1`);
10441066
await queryAndParse('field_module', `SELECT * FROM metaschema_modules_public.field_module WHERE database_id = $1`);
10451067
await queryAndParse('table_template_module', `SELECT * FROM metaschema_modules_public.table_template_module WHERE database_id = $1`);
1068+
await queryAndParse('secure_table_provision', `SELECT * FROM metaschema_modules_public.secure_table_provision WHERE database_id = $1`);
10461069
await queryAndParse('uuid_module', `SELECT * FROM metaschema_modules_public.uuid_module WHERE database_id = $1`);
10471070
await queryAndParse('default_ids_module', `SELECT * FROM metaschema_modules_public.default_ids_module WHERE database_id = $1`);
10481071
await queryAndParse('denormalized_table_field', `SELECT * FROM metaschema_modules_public.denormalized_table_field WHERE database_id = $1`);

pgpm/core/src/export/export-migrations.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ SET session_replication_role TO DEFAULT;`;
408408
'crypto_auth_module',
409409
'field_module',
410410
'table_module',
411+
'secure_table_provision',
411412
'user_profiles_module',
412413
'user_settings_module',
413414
'organization_settings_module',

0 commit comments

Comments
 (0)