From: Marcel de Rooy Date: Wed, 7 Aug 2013 12:24:23 +0000 (+0200) Subject: Bug 10572: (follow-up) DBrev to ensure presence of phone transport type X-Git-Tag: v3.14.00-beta~83 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=2eb34034dfbba16a49e071855bc95253779fd80a;p=koha-ffzg.git Bug 10572: (follow-up) DBrev to ensure presence of phone transport type Test plan: Run the updatestructure step of web installer. Check if you have a phone message_transport_type. Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall Signed-off-by: Galen Charlton --- diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 3386ea06ea..6b124177a9 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -7636,6 +7636,17 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.13.00.XXX"; +if ( CheckVersion($DBversion) ) { + #add phone if it is not there already (explains the ignore option) + $dbh->do(" +INSERT IGNORE INTO message_transport_types (message_transport_type) values ('phone'); + "); + print "Upgrade to $DBversion done (Bug 10572: Add phone to message_transport_types table for new installs)\n"; + SetVersion($DBversion); +} + + =head1 FUNCTIONS =head2 TableExists($table)