From 5cd5d480d99e598d68d26d9bbb5106318d845b70 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 11 Nov 2025 09:31:43 +0100 Subject: [PATCH] Check collation of statistics_meta DB table (#156327) --- .../components/recorder/auto_repairs/statistics/schema.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeassistant/components/recorder/auto_repairs/statistics/schema.py b/homeassistant/components/recorder/auto_repairs/statistics/schema.py index 13c172290cab..3cf16bd500f6 100644 --- a/homeassistant/components/recorder/auto_repairs/statistics/schema.py +++ b/homeassistant/components/recorder/auto_repairs/statistics/schema.py @@ -26,6 +26,9 @@ def validate_db_schema(instance: Recorder) -> set[str]: schema_errors |= validate_table_schema_supports_utf8( instance, StatisticsMeta, (StatisticsMeta.statistic_id,) ) + schema_errors |= validate_table_schema_has_correct_collation( + instance, StatisticsMeta + ) for table in (Statistics, StatisticsShortTerm): schema_errors |= validate_db_schema_precision(instance, table) schema_errors |= validate_table_schema_has_correct_collation(instance, table)