268425b5e3
* Handle statistics columns being unmigrated from previous downgrades If the user downgraded HA from 2023.3.x to an older version without restoring the database and they upgrade again with the same database they will have unmigrated statistics columns since we only migrate them once. As its expensive to check, we do not want to check every time at startup, so we will only do this one more time since the risk that someone will downgrade to an older version is very low at this point. * add guard to sqlite to prevent re-migrate * test * move test to insert with old schema * use helper * normalize timestamps * remove * add check * add fallback migration * add fallback migration * commit * remove useless logging * remove useless logging * do the other columns at the same time * coverage * dry * comment * Update tests/components/recorder/test_migration_from_schema_32.py |
||
---|---|---|
.. | ||
auto_repairs | ||
table_managers | ||
__init__.py | ||
common.py | ||
db_schema_0.py | ||
db_schema_16.py | ||
db_schema_18.py | ||
db_schema_22.py | ||
db_schema_23.py | ||
db_schema_23_with_newer_columns.py | ||
db_schema_25.py | ||
db_schema_28.py | ||
db_schema_30.py | ||
db_schema_32.py | ||
test_backup.py | ||
test_entity_registry.py | ||
test_filters.py | ||
test_filters_with_entityfilter.py | ||
test_filters_with_entityfilter_schema_37.py | ||
test_history.py | ||
test_history_db_schema_30.py | ||
test_history_db_schema_32.py | ||
test_init.py | ||
test_migrate.py | ||
test_migration_from_schema_32.py | ||
test_models.py | ||
test_models_legacy.py | ||
test_pool.py | ||
test_purge.py | ||
test_purge_v32_schema.py | ||
test_statistics.py | ||
test_statistics_v23_migration.py | ||
test_system_health.py | ||
test_util.py | ||
test_v32_migration.py | ||
test_websocket_api.py |