From 9cf14b0e4c901a138d15f51fb1a2847a40fd18db Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Wed, 14 Jan 2026 06:40:44 +0000 Subject: [PATCH 1/2] Add table_template_module to export flow --- pgpm/core/src/export/export-meta.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pgpm/core/src/export/export-meta.ts b/pgpm/core/src/export/export-meta.ts index 944e7bcd2..a27490bf4 100644 --- a/pgpm/core/src/export/export-meta.ts +++ b/pgpm/core/src/export/export-meta.ts @@ -865,6 +865,21 @@ const config: Record = { fields: 'uuid[]' } }, + table_template_module: { + schema: 'metaschema_modules_public', + table: 'table_template_module', + fields: { + id: 'uuid', + database_id: 'uuid', + schema_id: 'uuid', + private_schema_id: 'uuid', + table_id: 'uuid', + owner_table_id: 'uuid', + table_name: 'text', + node_type: 'text', + data: 'jsonb' + } + }, user_profiles_module: { schema: 'metaschema_modules_public', table: 'user_profiles_module', @@ -1075,6 +1090,7 @@ export const exportMeta = async ({ opts, dbname, database_id }: ExportMetaParams await queryAndParse('crypto_addresses_module', `SELECT * FROM metaschema_modules_public.crypto_addresses_module WHERE database_id = $1`); await queryAndParse('crypto_auth_module', `SELECT * FROM metaschema_modules_public.crypto_auth_module WHERE database_id = $1`); await queryAndParse('field_module', `SELECT * FROM metaschema_modules_public.field_module WHERE database_id = $1`); + await queryAndParse('table_template_module', `SELECT * FROM metaschema_modules_public.table_template_module WHERE database_id = $1`); await queryAndParse('uuid_module', `SELECT * FROM metaschema_modules_public.uuid_module WHERE database_id = $1`); await queryAndParse('default_ids_module', `SELECT * FROM metaschema_modules_public.default_ids_module WHERE database_id = $1`); await queryAndParse('denormalized_table_field', `SELECT * FROM metaschema_modules_public.denormalized_table_field WHERE database_id = $1`); From 2b59fb5696d9b08414149e92b86bc8c1e756e524 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Wed, 14 Jan 2026 07:02:40 +0000 Subject: [PATCH 2/2] Remove old module entries (user_profiles_module, user_settings_module, organization_settings_module) from export flow --- pgpm/core/src/export/export-meta.ts | 40 ----------------------------- 1 file changed, 40 deletions(-) diff --git a/pgpm/core/src/export/export-meta.ts b/pgpm/core/src/export/export-meta.ts index a27490bf4..4e3916db0 100644 --- a/pgpm/core/src/export/export-meta.ts +++ b/pgpm/core/src/export/export-meta.ts @@ -880,46 +880,6 @@ const config: Record = { data: 'jsonb' } }, - user_profiles_module: { - schema: 'metaschema_modules_public', - table: 'user_profiles_module', - fields: { - id: 'uuid', - database_id: 'uuid', - schema_id: 'uuid', - private_schema_id: 'uuid', - table_id: 'uuid', - table_name: 'text', - users_table_id: 'uuid' - } - }, - user_settings_module: { - schema: 'metaschema_modules_public', - table: 'user_settings_module', - fields: { - id: 'uuid', - database_id: 'uuid', - schema_id: 'uuid', - private_schema_id: 'uuid', - table_id: 'uuid', - table_name: 'text', - users_table_id: 'uuid' - } - }, - organization_settings_module: { - schema: 'metaschema_modules_public', - table: 'organization_settings_module', - fields: { - id: 'uuid', - database_id: 'uuid', - schema_id: 'uuid', - private_schema_id: 'uuid', - table_id: 'uuid', - table_name: 'text', - entity_table_id: 'uuid', - membership_type: 'int' - } - }, uuid_module: { schema: 'metaschema_modules_public', table: 'uuid_module',