diff --git a/packages/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error.sql b/packages/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error.sql new file mode 100644 index 000000000..f8e12899a --- /dev/null +++ b/packages/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error.sql @@ -0,0 +1,12 @@ +-- Deploy schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error to pg + +-- requires: schemas/metaschema_modules_public/tables/events_module/table + +BEGIN; + +-- Generated private function that records a refused operation under its error +-- code as the event name; the server discovers it here, beside record_event. +ALTER TABLE metaschema_modules_public.events_module + ADD COLUMN record_error text NOT NULL DEFAULT ''; + +COMMIT; diff --git a/packages/metaschema-modules/pgpm.plan b/packages/metaschema-modules/pgpm.plan index 99562e226..3e8012d16 100644 --- a/packages/metaschema-modules/pgpm.plan +++ b/packages/metaschema-modules/pgpm.plan @@ -98,3 +98,4 @@ schemas/metaschema_modules_public/tables/image_module/table [schemas/metaschema_ schemas/metaschema_modules_public/tables/repository_module/table [schemas/metaschema_modules_public/schema] 2026-08-15T01:00:00Z devin # add repository_module config table (repositories, events, workflows, builds, local change requests) schemas/metaschema_modules_public/tables/machine_module/table [schemas/metaschema_modules_public/schema] 2026-08-15T02:00:00Z devin # add machine_module config table (enrolled machines, sessions, command ledger) schemas/metaschema_modules_public/tables/cluster_module/table [schemas/metaschema_modules_public/schema] 2026-08-17T00:00:00Z devin # add cluster_module config table (fleet catalog: clusters, database servers, physical databases, placements) +schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error [schemas/metaschema_modules_public/tables/events_module/table] 2026-09-06T02:30:00Z devin # add record_error: the generated function that records a refused operation under its error code as the event name diff --git a/packages/metaschema-modules/revert/schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error.sql b/packages/metaschema-modules/revert/schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error.sql new file mode 100644 index 000000000..5b620962d --- /dev/null +++ b/packages/metaschema-modules/revert/schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error.sql @@ -0,0 +1,8 @@ +-- Revert schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error from pg + +BEGIN; + +ALTER TABLE metaschema_modules_public.events_module + DROP COLUMN record_error; + +COMMIT; diff --git a/packages/metaschema-modules/sql/metaschema-modules--0.44.0.bundle.tar.gz b/packages/metaschema-modules/sql/metaschema-modules--0.44.0.bundle.tar.gz index d9a902dba..e7754b825 100644 Binary files a/packages/metaschema-modules/sql/metaschema-modules--0.44.0.bundle.tar.gz and b/packages/metaschema-modules/sql/metaschema-modules--0.44.0.bundle.tar.gz differ diff --git a/packages/metaschema-modules/sql/metaschema-modules--0.44.0.sql b/packages/metaschema-modules/sql/metaschema-modules--0.44.0.sql index 54e2c5304..4e0121fee 100644 --- a/packages/metaschema-modules/sql/metaschema-modules--0.44.0.sql +++ b/packages/metaschema-modules/sql/metaschema-modules--0.44.0.sql @@ -6557,4 +6557,9 @@ COMMENT ON COLUMN metaschema_modules_public.cluster_module.database_servers_tabl COMMENT ON COLUMN metaschema_modules_public.cluster_module.physical_databases_table_id IS '@module_table'; -COMMENT ON COLUMN metaschema_modules_public.cluster_module.database_placements_table_id IS '@module_table'; \ No newline at end of file +COMMENT ON COLUMN metaschema_modules_public.cluster_module.database_placements_table_id IS '@module_table'; + +ALTER TABLE metaschema_modules_public.events_module + ADD COLUMN record_error text + NOT NULL + DEFAULT ''; \ No newline at end of file diff --git a/packages/metaschema-modules/verify/schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error.sql b/packages/metaschema-modules/verify/schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error.sql new file mode 100644 index 000000000..b3cd1b95d --- /dev/null +++ b/packages/metaschema-modules/verify/schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/events_module/alterations/add_record_error on pg + +BEGIN; + +SELECT record_error FROM metaschema_modules_public.events_module WHERE FALSE; + +ROLLBACK;