Hi
running Home Assistant Core in a Python venv, last Sunday updated from 2021.3.x ( can’t recall the exact version) to 2021.5.4
my database ( sqlite, mostly default settings in recorder, just excluded some entities from being stored) is about 560MB. Raspi 4 4GB, OS and data is on a SSD attached via USB 3.1 adapter
Migration to the new data model started here
2021-05-15 13:59:29 WARNING (Recorder) [homeassistant.components.recorder.migration] Database is about to upgrade. Schema version: 11
Question: Is there any “database upgraded” message after the new data model is fully applied? Is it still migrating or done meanwhile?
Reply to myself after browsing the code:
There are messages once the migration starts and when it ends, but the messages are on INFO-Level and unless the Logger is configured to run on INFO you won’t see them?
The message in the previous post is on level WARNING and thus written to the log file.
any developer for the recorder component to confirm?
I mean it kind of makes sense. Warning level is used for the initial message because it really is a warning, you aren’t supposed to shut down or restart until it has completed. The last is info level because it’s just informing that it’s done. Its saying everything is normal at this point which is clearly an informational message, you wouldn’t warn someone that things are running normally.
If you really want to capture that message but not run at info level you can set just the recorder component to info level in logger and leave everything else at warning level. Although I believe the ui also now shows the status of the migration in the bottom left corner while it’s running.
Hi.
ok, makes sense, you really do not want to scare people with warning messages. And there is no level in the logger for this purpose besides INFO.
Perhaps for a future release with database migration there is a space for example in the “System Health” to display the status of the recorder component
I guess here it finished a long time ago, just was unsure if it is meanwhile safe to restart for some system updates