Browse Source

Bug 25334: DBRev 20.06.00.060

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Jonathan Druart 4 years ago
parent
commit
6dd1dbc3a1
  1. 2
      Koha.pm
  2. 27
      installer/data/mysql/atomicupdate/bug_25334.perl
  3. 27
      installer/data/mysql/updatedatabase.pl

2
Koha.pm

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "20.06.00.059";
$VERSION = "20.06.00.060";
sub version {
return $VERSION;

27
installer/data/mysql/atomicupdate/bug_25334.perl

@ -1,27 +0,0 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do(q{
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
('PhoneNotification','0',NULL,'If ON, enables generation of phone notifications to be sent by plugins','YesNo')
});
$dbh->do(q{
INSERT INTO message_transport_types (message_transport_type) VALUES ('phone')
});
$dbh->do(q{
INSERT IGNORE INTO `message_transports`
(`message_attribute_id`, `message_transport_type`, `is_digest`, `letter_module`, `letter_code`)
VALUES
(1, 'phone', 0, 'circulation', 'DUE'),
(1, 'phone', 1, 'circulation', 'DUEDGST'),
(2, 'phone', 0, 'circulation', 'PREDUE'),
(2, 'phone', 1, 'circulation', 'PREDUEDGST'),
(4, 'phone', 0, 'reserves', 'HOLD'),
(5, 'phone', 0, 'circulation', 'CHECKIN'),
(6, 'phone', 0, 'circulation', 'CHECKOUT');
});
# Always end with this (adjust the bug info)
NewVersion( $DBversion, 25334, "Add generic 'phone' message transport type");
}

27
installer/data/mysql/updatedatabase.pl

@ -23208,6 +23208,33 @@ if( CheckVersion( $DBversion ) ) {
NewVersion( $DBversion, 19482, "Add mandatory column to search_field for ES mapping" );
}
$DBversion = '20.06.00.060';
if( CheckVersion( $DBversion ) ) {
$dbh->do(q{
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
('PhoneNotification','0',NULL,'If ON, enables generation of phone notifications to be sent by plugins','YesNo')
});
$dbh->do(q{
INSERT IGNORE INTO message_transport_types (message_transport_type) VALUES ('phone')
});
$dbh->do(q{
INSERT IGNORE INTO `message_transports`
(`message_attribute_id`, `message_transport_type`, `is_digest`, `letter_module`, `letter_code`)
VALUES
(1, 'phone', 0, 'circulation', 'DUE'),
(1, 'phone', 1, 'circulation', 'DUEDGST'),
(2, 'phone', 0, 'circulation', 'PREDUE'),
(2, 'phone', 1, 'circulation', 'PREDUEDGST'),
(4, 'phone', 0, 'reserves', 'HOLD'),
(5, 'phone', 0, 'circulation', 'CHECKIN'),
(6, 'phone', 0, 'circulation', 'CHECKOUT');
});
NewVersion( $DBversion, 25334, "Add generic 'phone' message transport type");
}
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';

Loading…
Cancel
Save