Silence spurious warnings about removing ix_states_entity_id with newer installs (#86961)

* Silence spurious warnings about removing ix_states_entity_id with newer installs

https://ptb.discord.com/channels/330944238910963714/427516175237382144/1069648035459641465

* Silence spurious warnings about removing ix_states_entity_id with newer installs

https://ptb.discord.com/channels/330944238910963714/427516175237382144/1069648035459641465
This commit is contained in:
J. Nick Koston 2023-01-30 07:38:33 -10:00 committed by GitHub
parent 53c5f02ca2
commit f874258e7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -274,9 +274,13 @@ def _drop_index(
"Finished dropping index %s from table %s", index_name, table_name
)
else:
if index_name == "ix_states_context_parent_id":
# Was only there on nightly so we do not want
if index_name in ("ix_states_entity_id", "ix_states_context_parent_id"):
# ix_states_context_parent_id was only there on nightly so we do not want
# to generate log noise or issues about it.
#
# ix_states_entity_id was only there for users who upgraded from schema
# version 8 or earlier. Newer installs will not have it so we do not
# want to generate log noise or issues about it.
return
_LOGGER.warning(