diff --git a/share/schema.sql b/share/schema.sql index 2a915e4..1859f55 100644 --- a/share/schema.sql +++ b/share/schema.sql @@ -110,8 +110,23 @@ CREATE TRIGGER IF NOT EXISTS create_tags AFTER INSERT ON source_files BEGIN INSERT INTO tags (source_file,last_change) VALUES (new.id,0); END; -CREATE TRIGGER IF NOT EXISTS force_destination_update_on_tag_update - AFTER UPDATE ON tags +DROP TRIGGER IF EXISTS force_destination_update_on_tag_update; +CREATE TRIGGER force_destination_update_on_tag_update + AFTER UPDATE OF + genre, + albumartist, + year, + album, + disc, + artist, + track, + title, + composer, + performer, + rate, + channels, + bitrate + ON tags BEGIN UPDATE destination_files SET last_change=0 WHERE source_file_id=old.source_file;