releasecountry support: update DB schema

This commit is contained in:
Vincent Riquer 2025-02-09 21:07:07 +01:00
parent 2cf968353f
commit 78c8c2b996
3 changed files with 11 additions and 1 deletions

View File

@ -1,5 +1,5 @@
#!/bin/bash
currentdbversion=3
currentdbversion=4
checkDatabaseVersion() {
local dbversion
if dbversion=$(Select atom version <<<"\"1\" = 1")

View File

@ -0,0 +1,9 @@
#!/bin/bash
upgradedatabase_3_4() {
echo "Upgrading database to version 4... (backup is $database.bak_v3)"
cp "$database" "$database.bak_v3"
echo 'ALTER TABLE tags ADD COLUMN releasecountry TEXT;' >&3
Update atom version 4 <<<"1 = 1"
}

View File

@ -58,6 +58,7 @@ CREATE TABLE IF NOT EXISTS tags (
title TEXT,
composer TEXT,
performer TEXT,
releasecountry TEXT,
depth INTEGER,
rate INTEGER,
channels INTEGER,