Bug 21639: Add phone transports to new and existing installs

To test:
1 - Confirm if you do or do not have 'phone' transports defined in the
message_transports table
2 - Apply patch
3 - Run updatedatabase
4 - If you didn't have them you should now
5 - Run updatedatabase again, confirm it doesn't error
6 - sudo koha-mysql kohadev
7 - DELETE from message_transports WHERE message_transport_type =
'phone'
8 - Run updatedatabase again
9 - Confirm the message transports table is restored
10 - Drop your DB (or reset_all in kohadevbox)
11 - Ensure the table is fully populated including phone notices

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Nick Clemens 2018-10-24 01:33:42 +00:00
parent bf8b4e773c
commit 71fdba0ff0
2 changed files with 19 additions and 3 deletions

View file

@ -0,0 +1,13 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do(q(
INSERT IGNORE INTO message_transports
(message_attribute_id,message_transport_type,is_digest,letter_module,letter_code)
VALUES
(2, 'phone', 0, 'circulation', 'PREDUE'),
(2, 'phone', 1, 'circulation', 'PREDUEDGST'),
(4, 'phone', 0, 'reserves', 'HOLD')
));
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 21639 - Add phone transports by default)\n";
}

View file

@ -3,14 +3,17 @@ insert into `message_transports`
values
(1, 'email', 0, 'circulation', 'DUE'),
(1, 'email', 1, 'circulation', 'DUEDGST'),
(2, 'email', 0, 'circulation', 'PREDUE'),
(2, 'email', 1, 'circulation', 'PREDUEDGST'),
(4, 'email', 0, 'reserves', 'HOLD'),
(1, 'sms', 0, 'circulation', 'DUE'),
(1, 'sms', 1, 'circulation', 'DUEDGST'),
(2, 'email', 0, 'circulation', 'PREDUE'),
(2, 'email', 1, 'circulation', 'PREDUEDGST'),
(2, 'sms', 0, 'circulation', 'PREDUE'),
(2, 'sms', 1, 'circulation', 'PREDUEDGST'),
(2, 'phone', 0, 'circulation', 'PREDUE'),
(2, 'phone', 1, 'circulation', 'PREDUEDGST'),
(4, 'email', 0, 'reserves', 'HOLD'),
(4, 'sms', 0, 'reserves', 'HOLD'),
(4, 'phone', 0, 'reserves', 'HOLD'),
(5, 'email', 0, 'circulation', 'CHECKIN'),
(5, 'sms', 0, 'circulation', 'CHECKIN'),
(6, 'email', 0, 'circulation', 'CHECKOUT'),