From 0fdb7052e9c2cc34a59d8b65201ba4e3393de8a5 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Mon, 3 Oct 2022 11:40:11 +0200 Subject: [PATCH] Add comment in recorder about dropping column (#79523) Add comment in recorder --- homeassistant/components/recorder/migration.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeassistant/components/recorder/migration.py b/homeassistant/components/recorder/migration.py index f82ec7ba1eb2..0ebd761ca53f 100644 --- a/homeassistant/components/recorder/migration.py +++ b/homeassistant/components/recorder/migration.py @@ -750,6 +750,9 @@ def _apply_update( # noqa: C901 elif new_version == 30: # This added a column to the statistics_meta table, removed again before # release of HA Core 2022.10.0 + # SQLite 3.31.0 does not support dropping columns. + # Once we require SQLite >= 3.35.5, we should drop the column: + # ALTER TABLE statistics_meta DROP COLUMN state_unit_of_measurement pass else: raise ValueError(f"No schema migration defined for version {new_version}")