Use BIGINT SQL type for ID columns (#123973)

Redo recorder ID migration from INT to BIGINT
This commit is contained in:
Erik Montnemery
2024-08-17 11:01:14 +02:00
committed by GitHub
parent 6c01e4b99c
commit a7bca9bcea
4 changed files with 26 additions and 8 deletions
+1 -1
View File
@@ -215,7 +215,7 @@ async def test_database_migration_failed(
# Test error handling in _modify_columns
(12, "sqlalchemy.engine.base.Connection.execute", False, 1, 0),
# Test error handling in _drop_foreign_key_constraints
(44, "homeassistant.components.recorder.migration.DropConstraint", False, 2, 1),
(46, "homeassistant.components.recorder.migration.DropConstraint", False, 2, 1),
],
)
@pytest.mark.skip_on_db_engine(["sqlite"])
@@ -640,7 +640,7 @@ async def test_out_of_disk_space_while_removing_foreign_key(
ix_states_event_id is removed from the states table.
Note that the test is somewhat forced; the states.event_id foreign key constraint is
removed when migrating to schema version 44, inspecting the schema in
removed when migrating to schema version 46, inspecting the schema in
cleanup_legacy_states_event_ids is not likely to fail.
"""
importlib.import_module(SCHEMA_MODULE)
@@ -779,7 +779,7 @@ async def test_out_of_disk_space_while_removing_foreign_key(
states_index_names = {index["name"] for index in states_indexes}
assert instance.use_legacy_events_index is True
# The states.event_id foreign key constraint was removed when
# migration to schema version 44
# migration to schema version 46
assert (
await instance.async_add_executor_job(
_get_event_id_foreign_keys