distributed sqlite with "old databases"
apollo13 opened this issue · 1 comments
What is the idea ?
When running ara in distributed sqlite mode against a few databases of mine it complained that a few fields are missing. This makes sense since the databases aren't upgraded at all. I am wondering if it would make sense (or at least support via a flag) to migrate old databases so they can be viewed with a newer ARA server.
This would probably also mean that we shouldn't ever squash and remove old migrations, but I guess that would be doable.
What do you think?
I've run into this issue as well and I think I manually migrated the databases with something like:
export ARA_DATABASE_NAME=/path/to/ansible.sqlite
ara-manage migrate
It is less than ideal, I will agree.
There are some cases where we automatically run SQL migrations, notably:
- when the callback runs with the default offline client
- when starting an ara container image
- when using the ara_api ansible role
In the client, it is enabled by a flag which defaults to true:
We could revisit this approach or think of something in specific for the sqlite middleware backend.