From 248f82f3c871317b5aedc9a0a0f0bd08d09f8118 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sun, 23 Feb 2020 21:26:00 +0100 Subject: [PATCH] [db] Fixup fixup in commit #00de0a3 (upgrade dbvers to 21.3) Forgot to include db_upgrade to v21.3 --- src/artwork.c | 2 +- src/db_upgrade.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/artwork.c b/src/artwork.c index 7e703139..7ab4d262 100644 --- a/src/artwork.c +++ b/src/artwork.c @@ -238,7 +238,7 @@ static struct artwork_source artwork_item_source[] = { .name = "embedded", .handler = source_item_embedded_get, - .data_kinds = (1 << DATA_KIND_FILE), + .data_kinds = (1 << DATA_KIND_FILE) | (1 << DATA_KIND_HTTP), .cache = ON_SUCCESS | ON_FAILURE, }, { diff --git a/src/db_upgrade.c b/src/db_upgrade.c index 9981a151..5fd0d88b 100644 --- a/src/db_upgrade.c +++ b/src/db_upgrade.c @@ -1036,6 +1036,19 @@ static const struct db_upgrade_query db_upgrade_v2102_queries[] = { U_v2102_SCVER_MINOR, "set schema_version_minor to 02" }, }; +#define U_V2103_SCVER_MAJOR \ + "UPDATE admin SET value = '21' WHERE key = 'schema_version_major';" +#define U_V2103_SCVER_MINOR \ + "UPDATE admin SET value = '03' WHERE key = 'schema_version_minor';" + +// This upgrade just changes triggers (will be done automatically by db_drop...) +static const struct db_upgrade_query db_upgrade_v2103_queries[] = + { + { U_V2103_SCVER_MAJOR, "set schema_version_major to 21" }, + { U_V2103_SCVER_MINOR, "set schema_version_minor to 03" }, + }; + + int db_upgrade(sqlite3 *hdl, int db_ver) @@ -1195,6 +1208,13 @@ db_upgrade(sqlite3 *hdl, int db_ver) case 2101: ret = db_generic_upgrade(hdl, db_upgrade_v2102_queries, ARRAY_SIZE(db_upgrade_v2102_queries)); + if (ret < 0) + return -1; + + /* FALLTHROUGH */ + + case 2102: + ret = db_generic_upgrade(hdl, db_upgrade_v2103_queries, ARRAY_SIZE(db_upgrade_v2103_queries)); if (ret < 0) return -1; break;