The constraints on songalbumid and songartistid where changed with v20, so we
need to make sure they take effect when upgrading.
This commit tries to do the table recreation like sqlite recommends and without
manually crafted copy queries that are probably prone to errors.
Since we are recreating anyway, this commit also reorders the columns slightly.
It also includes auto-drop/recreation of triggers (should really have been its
own commit) during upgrade, like is already done with indices.
Before, we returned either unordered (for RSP, meaning client had to
sort) or ordered by a client selected sort_clause[]. The latter are
multi-purpose and therefore not optimised for browse queries.
To speed up, we predefine the entire set of browse queries, including
order, with matching indices. The predefined queries are used except
if the client explicitly requests a non-default order or query.
As a special bonus, the commit also allows queries with I_SUB that
have an offset but no limit.
- queue table: define id column as AUTOINCREMENT (requires drop+create)
- queue table: add column queue_version
- files table: update http-stream virtual paths (constructing the
virtual path for http-streams changed in pr #449, this migrates existing
databases to be consistent to the newly created paths)