Bug 29393: (QA follow-up) Make database update idempotent
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
edefd14f23
commit
270ff5cd1d
14
installer/data/mysql/atomicupdate/Bug_29393_add_send_message_permission.pl
Normal file → Executable file
14
installer/data/mysql/atomicupdate/Bug_29393_add_send_message_permission.pl
Normal file → Executable file
|
|
@ -1,14 +1,16 @@
|
|||
use Modern::Perl;
|
||||
|
||||
return {
|
||||
bug_number => "29393",
|
||||
bug_number => "29393",
|
||||
description => "Add permission borrowers:send_messages_to_borrowers",
|
||||
up => sub {
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ($dbh, $out) = @$args{qw(dbh out)};
|
||||
my ( $dbh, $out ) = @$args{qw(dbh out)};
|
||||
|
||||
$dbh->do(q{INSERT INTO permissions (module_bit, code, description)
|
||||
VALUES (4, 'send_messages_to_borrowers', 'Send messages to patrons')});
|
||||
$dbh->do(
|
||||
q{INSERT IGNORE INTO permissions (module_bit, code, description)
|
||||
VALUES (4, 'send_messages_to_borrowers', 'Send messages to patrons')}
|
||||
);
|
||||
say $out "Update is going well so far";
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue