Set items.permanent_location to the current value
of items.location - otherwise, the item shelving location
could get blanked as existing items are checked in.

Signed-off-by: Galen Charlton <[email protected]>
---
 installer/data/mysql/updatedatabase.pl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/installer/data/mysql/updatedatabase.pl 
b/installer/data/mysql/updatedatabase.pl
index c2089c5..f28624f 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -2513,6 +2513,7 @@ if (C4::Context->preference("Version") < 
TransformToNum($DBversion)) {
 $DBversion = '3.01.00.043';
 if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     $dbh->do('ALTER TABLE items ADD COLUMN permanent_location VARCHAR(80) 
DEFAULT NULL AFTER location');
+    $dbh->do('UPDATE items SET permanent_location = location');
     $dbh->do("INSERT INTO `systempreferences` ( `variable` , `value` , 
`options` , `explanation` , `type` ) VALUES ( 'NewItemsDefaultLocation', '', 
'', 'If set, all new items will have a location of the given Location Code ( 
Authorized Value type LOC )', '')");
     $dbh->do("INSERT INTO `systempreferences` ( `variable` , `value` , 
`options` , `explanation` , `type` ) VALUES ( 'InProcessingToShelvingCart', 
'0', '', 'If set, when any item with a location code of PROC is ''checked in'', 
it''s location code will be changed to CART.', 'YesNo')");
     $dbh->do("INSERT INTO `systempreferences` ( `variable` , `value` , 
`options` , `explanation` , `type` ) VALUES ( 'ReturnToShelvingCart', '0', '', 
'If set, when any item is ''checked in'', it''s location code will be changed 
to CART.', 'YesNo')");
-- 
1.6.3.3

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to