From 270652900690bea8c6e011102d5382cd9871f74c Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Tue, 10 Oct 2023 01:27:39 +0200 Subject: [PATCH] DeviceDatabaseBackend: Add missing ebur128 fields --- data/schema/device-schema.sql | 9 ++++++--- src/device/devicedatabasebackend.cpp | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/data/schema/device-schema.sql b/data/schema/device-schema.sql index 76a20b3f1..418e3dea0 100644 --- a/data/schema/device-schema.sql +++ b/data/schema/device-schema.sql @@ -18,7 +18,7 @@ CREATE TABLE device_%deviceid_songs ( track INTEGER NOT NULL DEFAULT -1, disc INTEGER NOT NULL DEFAULT -1, year INTEGER NOT NULL DEFAULT -1, - originalyear INTEGER NOT NULL DEFAULT 0, + originalyear INTEGER NOT NULL DEFAULT -1, genre TEXT, compilation INTEGER NOT NULL DEFAULT 0, composer TEXT, @@ -83,7 +83,10 @@ CREATE TABLE device_%deviceid_songs ( musicbrainz_track_id TEXT, musicbrainz_disc_id TEXT, musicbrainz_release_group_id TEXT, - musicbrainz_work_id TEXT + musicbrainz_work_id TEXT, + + ebur128_integrated_loudness_lufs REAL, + ebur128_loudness_range_lu REAL ); @@ -96,4 +99,4 @@ CREATE VIRTUAL TABLE device_%deviceid_fts USING fts5( tokenize = "unicode61 remove_diacritics 1" ); -UPDATE devices SET schema_version=4 WHERE ROWID=%deviceid; +UPDATE devices SET schema_version=5 WHERE ROWID=%deviceid; diff --git a/src/device/devicedatabasebackend.cpp b/src/device/devicedatabasebackend.cpp index 5acccf261..43b0b3f3d 100644 --- a/src/device/devicedatabasebackend.cpp +++ b/src/device/devicedatabasebackend.cpp @@ -36,7 +36,7 @@ #include "core/scopedtransaction.h" #include "devicedatabasebackend.h" -const int DeviceDatabaseBackend::kDeviceSchemaVersion = 4; +const int DeviceDatabaseBackend::kDeviceSchemaVersion = 5; DeviceDatabaseBackend::DeviceDatabaseBackend(QObject *parent) : QObject(parent),