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

(-)a/installer/data/mysql/atomicupdate/bug_30600_-_fix_branchtransfers_recalls_enum.pl (+13 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "30600",
5
    description => "Recall enum option should only exist for branchtransfers.reason, no CancelRecall",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        $dbh->do(q{ALTER TABLE branchtransfers MODIFY COLUMN reason ENUM ('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve', 'Recall') });
11
        $dbh->do(q{ALTER TABLE branchtransfers MODIFY COLUMN cancellation_reason ENUM ('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve','ItemLost','WrongTransfer') });
12
    },
13
};
(-)a/installer/data/mysql/kohastructure.sql (-3 / +2 lines)
Lines 1557-1564 CREATE TABLE `branchtransfers` ( Link Here
1557
  `datecancelled` datetime DEFAULT NULL COMMENT 'the date the transfer was cancelled',
1557
  `datecancelled` datetime DEFAULT NULL COMMENT 'the date the transfer was cancelled',
1558
  `tobranch` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'the branch the transfer was going to',
1558
  `tobranch` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'the branch the transfer was going to',
1559
  `comments` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any comments related to the transfer',
1559
  `comments` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any comments related to the transfer',
1560
  `reason` enum('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve','TransferCancellation','Recall','CancelRecall') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer',
1560
  `reason` enum('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve','TransferCancellation','Recall') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer',
1561
  `cancellation_reason` enum('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve','ItemLost', 'WrongTransfer','Recall','CancelRecall') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer cancellation',
1561
  `cancellation_reason` enum('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve','ItemLost', 'WrongTransfer') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer cancellation',
1562
  PRIMARY KEY (`branchtransfer_id`),
1562
  PRIMARY KEY (`branchtransfer_id`),
1563
  KEY `frombranch` (`frombranch`),
1563
  KEY `frombranch` (`frombranch`),
1564
  KEY `tobranch` (`tobranch`),
1564
  KEY `tobranch` (`tobranch`),
1565
- 

Return to bug 30600