Skip to content

Commit e9e9a2d

Browse files
committed
Remove unused
1 parent f458ffd commit e9e9a2d

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

mysql_ch_replicator/clickhouse_api.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -117,26 +117,6 @@ def get_databases(self):
117117
database_list = [row[0] for row in databases]
118118
return database_list
119119

120-
def validate_database_schema(self, expected_tables):
121-
"""Validates that all expected tables exist in the database and returns missing tables"""
122-
if self.database not in self.get_databases():
123-
logger.warning(f"Database {self.database} does not exist")
124-
return False, expected_tables
125-
126-
existing_tables = self.get_tables()
127-
missing_tables = [table for table in expected_tables if table not in existing_tables]
128-
129-
if missing_tables:
130-
# Log with a count for large numbers of missing tables
131-
if len(missing_tables) > 10:
132-
sample_tables = ", ".join(missing_tables[:10])
133-
logger.warning(f"Missing {len(missing_tables)} tables in {self.database}. First 10: {sample_tables}...")
134-
else:
135-
logger.warning(f"Missing tables in {self.database}: {', '.join(missing_tables)}")
136-
return False, missing_tables
137-
138-
return True, []
139-
140120
def execute_command(self, query):
141121
for attempt in range(ClickhouseApi.MAX_RETRIES):
142122
try:

0 commit comments

Comments
 (0)