Skip to content

Commit 09a869a

Browse files
committed
Improve
1 parent a50a244 commit 09a869a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

etl-postgres/src/types/schema.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,10 @@ impl ReplicatedTableSchema {
311311
pub fn column_schemas(&self) -> impl Iterator<Item = &ColumnSchema> + Clone + '_ {
312312
// Assuming that the schema is created via the constructor, we can safely assume that the
313313
// column schemas and replication mask are of the same length.
314-
debug_assert!(self.replication_mask.len() == self.table_schema.column_schemas.len());
314+
debug_assert!(
315+
self.replication_mask.len() == self.table_schema.column_schemas.len(),
316+
"the replication mask columns have a different len from the table schema columns, they should be the same"
317+
);
315318

316319
self.table_schema
317320
.column_schemas

etl/migrations/20251127090000_schema_change_messages.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ $$;
142142

143143
drop event trigger if exists etl_ddl_message_trigger;
144144

145+
-- Only ALTER TABLE is captured because:
146+
-- - CREATE TABLE: No need, since the initial schema is loaded during the first table copy operation.
147+
-- - DROP TABLE: No need, since dropped tables are not supported right now.
148+
-- This trigger focuses on schema changes to existing replicated tables.
145149
create event trigger etl_ddl_message_trigger
146150
on ddl_command_end
147151
when tag in ('ALTER TABLE')

0 commit comments

Comments
 (0)