Add comment in recorder about dropping column (#79523)

Add comment in recorder
This commit is contained in:
Erik Montnemery 2022-10-03 11:40:11 +02:00 committed by GitHub
parent 125c037def
commit 0fdb7052e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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}")