Recorder migration issues since upgrade to 0.51.1

Since upgrading to 0.51.1 I’m now seeing the following issues in the log. Any idea if there is a way to fix these now? Restarting doesn’t seem to improve things.

2017-08-14 08:06:15 WARNING (Recorder) [homeassistant.components.recorder.migration] Failed to drop index ix_states_created_domain from table states. Schema Migration will continue; this is not a critical operation.
2017-08-14 08:06:15 WARNING (Recorder) [homeassistant.components.recorder.migration] Failed to drop index states__state_changes from table states. Schema Migration will continue; this is not a critical operation.
2017-08-14 08:06:15 WARNING (Recorder) [homeassistant.components.recorder.migration] Failed to drop index states__significant_changes from table states. Schema Migration will continue; this is not a critical operation.
2017-08-14 08:06:20 WARNING (Recorder) [homeassistant.components.recorder.migration] Failed to drop index ix_states_entity_id_created from table states. Schema Migration will continue; this is not a critical operation.
2017-08-14 08:06:24 WARNING (MainThread) [homeassistant.setup] Setup of recorder is taking over 10 seconds.
2017-08-14 08:06:25 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.OperationalError) database is locked [SQL: ‘CREATE INDEX ix_states_entity_id_last_updated ON states (entity_id, last_updated)’]
2017-08-14 08:06:25 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.OperationalError) database is locked [SQL: ‘CREATE INDEX ix_states_entity_id_last_updated ON states (entity_id, last_updated)’] (retrying in 3 seconds)

The release post had in bold letters that update will take time to migrate the database. Let it migrate the database and it should work. If you don’t care about the database, you can delete the .db file and then restart.

Thanks for the reply @arsaboo. I did let the migration finish (at least I thought I had) and the system has been rebooted several times, but I suspect something didn’t complete as needed, or maybe locked when it was trying to drop the indexes.

I don’t so much care about the database as I assume it is only historical data, which I’m not concerned with losing.

Will the migration restart each time hass it restarted?

I too am having this same issue Let the ‘migration’ run for 24 hours and it still says the same error and i have lost all my zwave capabilities.

ozmule, did you find a solution?

Thanks Shawn

@Shawn_Dowden I removed (rather renamed it) the .db file and that resolved the issue.

Thank you sir!

That worked but i had to rename several broken nodes. I am looking for a permanent
fix for this within the config files.

Shawn