diff --git a/homeassistant/components/recorder/db_schema.py b/homeassistant/components/recorder/db_schema.py index 3ac1b55bef2..c3bc6551ed6 100644 --- a/homeassistant/components/recorder/db_schema.py +++ b/homeassistant/components/recorder/db_schema.py @@ -179,11 +179,6 @@ class Events(Base): """Event history data.""" __table_args__ = ( - # Used for fetching events at a specific time - # see logbook - Index( - "ix_events_event_type_id_time_fired_ts", "event_type_id", "time_fired_ts" - ), Index( EVENTS_CONTEXT_ID_BIN_INDEX, "context_id_bin", diff --git a/homeassistant/components/recorder/migration.py b/homeassistant/components/recorder/migration.py index d5bf8c3db5f..b44066cf5ed 100644 --- a/homeassistant/components/recorder/migration.py +++ b/homeassistant/components/recorder/migration.py @@ -983,7 +983,6 @@ def _apply_update( # noqa: C901 elif new_version == 37: _add_columns(session_maker, "events", [f"event_type_id {big_int}"]) _create_index(session_maker, "events", "ix_events_event_type_id") - _create_index(session_maker, "events", "ix_events_event_type_id_time_fired_ts") else: raise ValueError(f"No schema migration defined for version {new_version}")