Commit Graph

17 Commits

Author SHA1 Message Date
whatdoineed2do/Ray
7e02eb510d [db] add songartistid to queue tbl 2019-02-12 09:21:39 +00:00
ejurgensen
a4c254e6e7 [db] Recreate v20 files table, so that new constraints take effect if upgrading
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.
2018-12-31 15:55:49 +01:00
ejurgensen
d3121f4ec7 [db] Use prepared statements for file insert, update and ping
Get rid of the SQL query strings, since they are prone to errors and are
probably also slower that using prepared statements.
2018-12-31 15:55:49 +01:00
chme
42cbd721fd [db] Minor version upgrade: new column "path" in directories table 2018-12-18 08:28:19 +01:00
whatdoineed2do
488f52b04f [db] schema v19.11 support composer in queue tbl 2018-11-30 17:22:21 +01:00
ejurgensen
f686756dd8 [db] Upgrade schema to 19.10 to remove invalid time_skipped values from commit fde0a281 2018-09-19 19:40:45 +02:00
ejurgensen
fde0a28142 Support for skip_count and time_skipped file metadata 2018-08-18 22:56:27 +02:00
chme
6bdcda1524 [db/filescanner] Upgrade database to v19.08 and support limit/order by
in smart playlist files
2018-04-15 22:11:40 +02:00
ejurgensen
ea6fd1476a [db] Improve speed of browse queries (issue #478)
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.
2018-03-02 21:11:31 +01:00
chme
91573752d9 [db] Update v19.05 to v19.06
- 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)
2017-12-09 11:01:41 +01:00
ejurgensen
4d47307a02 [db/filescanner] Add index on fname, change playlist matching (wip) 2017-10-17 23:11:31 +02:00
ejurgensen
0e9bca9e3d [db] Add column for auth key to speakers table (incl methods for saving/retrieving) 2017-06-18 01:29:40 +02:00
ejurgensen
e92152cadb [db] Upgrade db to 19.03: Add artwork_url column to queue table 2017-01-27 22:36:00 +01:00
chme
e29539fa68 [db] add primary key to admin table 2016-12-10 06:15:43 +01:00
chme
d431ace5c4 [db] Use a minor version update for the new queue table (v19.01 instead
of v20.00)
2016-12-04 07:28:06 +01:00
chme
0beb68e1f1 [db] Upgrade db to v20.00
- New table 'queue' for persisting the queue/current playlist
- New entry 'plversion' in admin table for queue version
2016-12-03 10:58:26 +01:00
chme
f7aa3c225b [db] Move initialization of new db into its own file (db_init.c) 2016-11-04 14:31:15 +01:00