38 lines
773 B
Bash
38 lines
773 B
Bash
#!/usr/bin/env bash
|
|
|
|
upgradedatabase_5_6() {
|
|
echo "Upgrading database to version 6... (backup is $database.bak_v5)"
|
|
cp "$database" "$database.bak_v5"
|
|
echo '
|
|
ALTER TABLE tags ADD COLUMN replaygain_alb TEXT;
|
|
ALTER TABLE tags ADD COLUMN replaygain_trk TEXT;
|
|
DROP TRIGGER force_destination_update_on_tag_update;
|
|
CREATE TRIGGER IF NOT EXISTS force_destination_update_on_tag_update
|
|
AFTER UPDATE OF
|
|
genre,
|
|
albumartist,
|
|
year,
|
|
album,
|
|
disc,
|
|
artist,
|
|
track,
|
|
title,
|
|
composer,
|
|
performer,
|
|
releasecountry,
|
|
replaygain_alb,
|
|
replaygain_trk,
|
|
rate,
|
|
channels,
|
|
bitrate,
|
|
depth
|
|
ON tags
|
|
BEGIN
|
|
UPDATE destination_files SET last_change=0
|
|
WHERE source_file_id=old.source_file;
|
|
END;
|
|
' >&3
|
|
|
|
Update atom version 6 <<<"1 = 1"
|
|
}
|