mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix repack when using pymysql (#37142)
This commit is contained in:
parent
39a5f68914
commit
a4501b93c4
@ -46,7 +46,7 @@ def purge_old_data(instance, purge_days, repack):
|
||||
_LOGGER.debug("Vacuuming SQL DB to free space")
|
||||
instance.engine.execute("VACUUM")
|
||||
# Optimize mysql / mariadb tables to free up space on disk
|
||||
elif instance.engine.driver == "mysqldb":
|
||||
elif instance.engine.driver in ("mysqldb", "pymysql"):
|
||||
_LOGGER.debug("Optimizing SQL DB to free space")
|
||||
instance.engine.execute("OPTIMIZE TABLE states, events, recorder_runs")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user