Bug 26057: Add datecancelled, cancellation_reason fields
[koha.git] / installer / data / mysql / atomicupdate / bug_26057.perl
1 $DBversion = 'XXX'; # will be replaced by the RM
2 if( CheckVersion( $DBversion ) ) {
3
4     if( !column_exists( 'branchtransfers', 'datecancelled' ) ) {
5         $dbh->do( "ALTER TABLE `branchtransfers` ADD COLUMN `datecancelled` datetime default NULL AFTER `datearrived`" );
6     }
7
8     if( !column_exists( 'branchtransfers', 'cancellation_reason' ) ) {
9         $dbh->do( "ALTER TABLE `branchtransfers` ADD COLUMN `cancellation_reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve') DEFAULT NULL AFTER `reason`" );
10     }
11
12     NewVersion( $DBversion, 26057, "Add datecancelled field to branchtransfers");
13 }