From 1ebb2db92c0c8b3a49934ced6f9b8ca81265be6b Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 8 Sep 2023 09:35:21 -0400 Subject: [PATCH] Bug 8838: Make db update idempotent Signed-off-by: Laura ONeil Signed-off-by: Emily Lamancusa Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/atomicupdate/bug_8838.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_8838.pl b/installer/data/mysql/atomicupdate/bug_8838.pl index cfcb5e8fb5..00093fa260 100755 --- a/installer/data/mysql/atomicupdate/bug_8838.pl +++ b/installer/data/mysql/atomicupdate/bug_8838.pl @@ -8,11 +8,11 @@ return { my ( $dbh, $out ) = @$args{qw(dbh out)}; $dbh->do(q{ - INSERT INTO `letter` VALUES (NULL,'reserves','HOLDDGST','','Hold available for pickup (digest)',0,'Hold(s) available for pickup','You have one or more holds available for pickup:\r\n----\r\nTitle: [% hold.biblio.title %]\r\nAuthor: [% hold.biblio.author %]\r\nCopy: [% hold.item.copynumber %]\r\nLocation: [% hold.branch.branchname %]\r\nWaiting since: [% hold.waitingdate %]:\r\n[% hold.branch.branchaddress1 %]\r\n[% hold.branch.branchaddress2 %]\r\n[% hold.branch.branchaddress3 %]\r\n[% hold.branch.branchcity %] [% hold.branch.branchzip %]\r\n----','email','default','2023-08-29 18:42:15'); + INSERT IGNORE INTO `letter` VALUES (NULL,'reserves','HOLDDGST','','Hold available for pickup (digest)',0,'Hold(s) available for pickup','You have one or more holds available for pickup:\r\n----\r\nTitle: [% hold.biblio.title %]\r\nAuthor: [% hold.biblio.author %]\r\nCopy: [% hold.item.copynumber %]\r\nLocation: [% hold.branch.branchname %]\r\nWaiting since: [% hold.waitingdate %]:\r\n[% hold.branch.branchaddress1 %]\r\n[% hold.branch.branchaddress2 %]\r\n[% hold.branch.branchaddress3 %]\r\n[% hold.branch.branchcity %] [% hold.branch.branchzip %]\r\n----','email','default','2023-08-29 18:42:15'); }); $dbh->do(q{ - INSERT INTO message_transports VALUES + INSERT IGNORE INTO message_transports VALUES ( 4, "email", 1, "reserves", "HOLDDGST", "" ), ( 4, "sms", 1, "reserves", "HOLDDGST", "" ), ( 4, "phone", 1, "reserves", "HOLDDGST", ""); -- 2.39.5