core/tests/components/recorder
J. Nick Koston 00c1a3fd4e
Ensure legacy event foreign key is removed from the states table when a previous rebuild failed (#123388)
* Ensure legacy event foreign key is removed from the states table

If the system ran out of disk space removing the FK, it would
fail. #121938 fixed that to try again, however that PR was made
ineffective by #122069 since it will never reach the check.

To solve this, the migration version is incremented to 2, and
the migration is no longer marked as done unless the rebuild
/fk removal is successful.

* fix logic for mysql

* fix test

* asserts

* coverage

* coverage

* narrow test

* fixes

* split tests

* should have skipped

* fixture must be used
2024-08-09 06:19:12 +02:00
..
auto_repairs Avoid nesting sessions in recorder auto repairs tests (#122596) 2024-07-25 12:52:13 -05:00
table_managers
__init__.py
common.py Run statistics on 5-minute intervals in tests (#122592) 2024-07-25 17:32:49 +02:00
conftest.py Refactor recorder schema migration (#122372) 2024-07-22 16:53:54 +02:00
db_schema_0.py
db_schema_9.py Update pylint to 3.2.5 (#122126) 2024-07-18 15:54:54 +02:00
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
db_schema_42.py
db_schema_43.py
test_backup.py
test_entity_registry.py
test_filters.py Update import locations in tests (#122216) 2024-07-20 11:16:04 +02:00
test_filters_with_entityfilter.py Update import locations in tests (#122216) 2024-07-20 11:16:04 +02:00
test_filters_with_entityfilter_schema_37.py Update import locations in tests (#122216) 2024-07-20 11:16:04 +02:00
test_history.py
test_history_db_schema_30.py
test_history_db_schema_32.py
test_history_db_schema_42.py
test_init.py Refactor recorder schema migration (#122372) 2024-07-22 16:53:54 +02:00
test_migrate.py Ensure legacy event foreign key is removed from the states table when a previous rebuild failed (#123388) 2024-08-09 06:19:12 +02:00
test_migration_from_schema_32.py Fix recorder datetime annotations (#122214) 2024-07-20 11:10:25 +02:00
test_migration_run_time_migrations_remember.py Refactor recorder data migration (#121009) 2024-07-16 21:50:19 +02:00
test_models.py
test_models_legacy.py
test_pool.py
test_purge.py Avoid nesting sessions in recorder purge tests (#122581) 2024-07-25 13:12:10 +02:00
test_purge_v32_schema.py Avoid nesting sessions in recorder purge tests (#122581) 2024-07-25 13:12:10 +02:00
test_statistics.py Add test of recorder platform with statistics support (#122754) 2024-07-29 11:57:53 +02:00
test_statistics_v23_migration.py
test_system_health.py
test_util.py Warn that the minimum SQLite version will change to 3.40.1 as of 2025.2 (#104298) 2024-07-31 08:13:04 -05:00
test_v32_migration.py Ensure legacy event foreign key is removed from the states table when a previous rebuild failed (#123388) 2024-08-09 06:19:12 +02:00
test_websocket_api.py Remove support for live schema migration of old recorder databases (#122399) 2024-07-29 15:52:18 +02:00