Bug 29605: branchtransfers.cancellation_reason

reason and cancellation_reason was inversed, and the enum values were
lower cases

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2021-12-02 12:55:36 +01:00 committed by Fridolin Somers
parent b7bd116bd5
commit 440f31c268
2 changed files with 35 additions and 13 deletions

View file

@ -62,6 +62,28 @@ return {
$dbh->do(q{ALTER TABLE search_marc_map MODIFY `marc_type` enum('marc21','unimarc') NOT NULL COMMENT 'what MARC type this map is for'});
say $out "Ensure NOT NULL on search_marc_map.marc_type";
$dbh->do(
q{
alter table
`branchtransfers`
modify column
`cancellation_reason` enum(
'Manual',
'StockrotationAdvance',
'StockrotationRepatriation',
'ReturnToHome',
'ReturnToHolding',
'RotatingCollection',
'Reserve',
'LostReserve',
'CancelReserve',
'ItemLost',
'WrongTransfer'
) DEFAULT NULL
after `reason`
}
);
say $out "Ensure branchtransfers.cancellation_reason enum values are uppercase";
},
}

View file

@ -14,19 +14,19 @@ use Modern::Perl;
`branchtransfers`
modify column
`cancellation_reason` enum(
'manual',
'stockrotationadvance',
'stockrotationrepatriation',
'returntohome',
'returntoholding',
'rotatingcollection',
'reserve',
'lostreserve',
'cancelreserve',
'itemlost',
'wrongtransfer'
)
after `comments`
'Manual',
'StockrotationAdvance',
'StockrotationRepatriation',
'ReturnToHome',
'ReturnToHolding',
'RotatingCollection',
'Reserve',
'LostReserve',
'CancelReserve',
'ItemLost',
'WrongTransfer'
) DEFAULT NULL
after `reason`
}
);
},