Bug 24298: Add return enums to branchstransfer triggers

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2020-01-16 15:25:34 +00:00
parent bbe77b10d8
commit 26b64bf8b4
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
2 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,23 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
# Add return reasons to enum
$dbh->do(
qq{
ALTER TABLE
`branchtransfers`
MODIFY COLUMN
`reason` enum(
'Manual',
'StockrotationAdvance',
'StockrotationRepatriation',
'ReturnToHome',
'ReturnToHolding'
)
AFTER `comments`
}
);
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 24296 - Add 'return' reasons to branchtransfers enum)\n";
}

View File

@ -906,7 +906,7 @@ CREATE TABLE `branchtransfers` ( -- information for items that are in transit be
`datearrived` datetime default NULL, -- the date the transfer arrived at its destination
`tobranch` varchar(10) NOT NULL default '', -- the branch the transfer was going to
`comments` LONGTEXT, -- any comments related to the transfer
`reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation'), -- what triggered the transfer
`reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding'), -- what triggered the transfer
PRIMARY KEY (`branchtransfer_id`),
KEY `frombranch` (`frombranch`),
KEY `tobranch` (`tobranch`),