From 20d1cbebcb916cc3854a0ad31a651feac612cdd1 Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Sat, 2 Mar 2013 00:14:22 +0100 Subject: [PATCH] fix mime_type_actions UPDATE trigger --- share/schema.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/schema.sql b/share/schema.sql index 3562f1e..d4f66e0 100644 --- a/share/schema.sql +++ b/share/schema.sql @@ -43,7 +43,10 @@ CREATE VIEW mime_type_actions AS ON mime_actions.mime_type = mime_types.id; CREATE TRIGGER update_mime_actions INSTEAD OF UPDATE OF action ON mime_type_actions BEGIN - UPDATE mime_actions SET action=new.action WHERE mime_type=old.id; + UPDATE mime_actions + SET action=new.action + WHERE mime_type=old.id + AND destination_id=old.destination_id; END; CREATE TRIGGER create_mime_actions AFTER INSERT ON mime_types