From d431ace5c4dee4c6c0a72609132d02cf87043663 Mon Sep 17 00:00:00 2001 From: chme Date: Sun, 4 Dec 2016 07:28:06 +0100 Subject: [PATCH] [db] Use a minor version update for the new queue table (v19.01 instead of v20.00) --- src/db_init.h | 4 ++-- src/db_upgrade.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/db_init.h b/src/db_init.h index 33312835..88287f18 100644 --- a/src/db_init.h +++ b/src/db_init.h @@ -25,8 +25,8 @@ * version of the database? If yes, then it is a minor upgrade, if no, then it * is a major upgrade. In other words minor version upgrades permit downgrading * forked-daapd after the database was upgraded. */ -#define SCHEMA_VERSION_MAJOR 20 -#define SCHEMA_VERSION_MINOR 00 +#define SCHEMA_VERSION_MAJOR 19 +#define SCHEMA_VERSION_MINOR 01 int db_init_indices(sqlite3 *hdl); diff --git a/src/db_upgrade.c b/src/db_upgrade.c index 799a7dc6..6745409a 100644 --- a/src/db_upgrade.c +++ b/src/db_upgrade.c @@ -1479,13 +1479,13 @@ db_upgrade_v19(sqlite3 *hdl) #define U_V2000_SCVER_MINOR \ "UPDATE admin SET value = '00' WHERE key = 'schema_version_minor';" -static const struct db_upgrade_query db_upgrade_v2000_queries[] = +static const struct db_upgrade_query db_upgrade_v1901_queries[] = { { U_V2000_CREATE_TABLE_QUEUE, "create table directories" }, - { U_V2000_QUEUE_VERSION, "insert plversion" }, + { U_V2000_QUEUE_VERSION, "insert queue version" }, - { U_V2000_SCVER_MAJOR, "set schema_version_major to 20" }, - { U_V2000_SCVER_MINOR, "set schema_version_minor to 00" }, + { U_V2000_SCVER_MAJOR, "set schema_version_major to 19" }, + { U_V2000_SCVER_MINOR, "set schema_version_minor to 01" }, }; @@ -1602,7 +1602,7 @@ db_upgrade(sqlite3 *hdl, int db_ver) /* FALLTHROUGH */ case 1900: - ret = db_generic_upgrade(hdl, db_upgrade_v2000_queries, sizeof(db_upgrade_v2000_queries) / sizeof(db_upgrade_v2000_queries[0])); + ret = db_generic_upgrade(hdl, db_upgrade_v1901_queries, sizeof(db_upgrade_v1901_queries) / sizeof(db_upgrade_v1901_queries[0])); if (ret < 0) return -1;