View | Details | Raw Unified | Return to bug 26057
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_26057.perl (+13 lines)
Line 0 Link Here
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
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +2 lines)
Lines 1526-1534 CREATE TABLE `branchtransfers` ( Link Here
1526
  `datesent` datetime DEFAULT NULL COMMENT 'the date the transfer was initialized',
1526
  `datesent` datetime DEFAULT NULL COMMENT 'the date the transfer was initialized',
1527
  `frombranch` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'the branch the transfer is coming from',
1527
  `frombranch` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'the branch the transfer is coming from',
1528
  `datearrived` datetime DEFAULT NULL COMMENT 'the date the transfer arrived at its destination',
1528
  `datearrived` datetime DEFAULT NULL COMMENT 'the date the transfer arrived at its destination',
1529
  `datecancelled` datetime default NULL COMMENT 'the date the transfer was cancelled',
1529
  `tobranch` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'the branch the transfer was going to',
1530
  `tobranch` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'the branch the transfer was going to',
1530
  `comments` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any comments related to the transfer',
1531
  `comments` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any comments related to the transfer',
1531
  `reason` enum('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer',
1532
  `reason` enum('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer',
1533
  `cancellation_reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve') default NULL COMMENT 'what triggered the transfer cancellation',
1532
  PRIMARY KEY (`branchtransfer_id`),
1534
  PRIMARY KEY (`branchtransfer_id`),
1533
  KEY `frombranch` (`frombranch`),
1535
  KEY `frombranch` (`frombranch`),
1534
  KEY `tobranch` (`tobranch`),
1536
  KEY `tobranch` (`tobranch`),
1535
- 

Return to bug 26057