Bug 11008: Drop column aqorders.supplierreference
authorJonathan Druart <jonathan.druart@biblibre.com>
Fri, 18 Jul 2014 10:54:28 +0000 (12:54 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 13 Apr 2015 13:10:43 +0000 (10:10 -0300)
It seems that this column has never been used.

Test plan:
1/ Execute the updatedatabase entry.
2/ git grep supplierreference should not return occurrence in the code (except
in Koha/Schema/*
3/ prove t/db_dependent/Acquisition.t should return green.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl
t/db_dependent/Acquisition.t

index 6ddba43..de10574 100644 (file)
@@ -3060,7 +3060,6 @@ CREATE TABLE `aqorders` ( -- information related to the basket line items
   `cancellationreason` text default NULL, -- reason of cancellation
   `order_internalnote` mediumtext, -- notes related to this order line, made for staff
   `order_vendornote` mediumtext, -- notes related to this order line, made for vendor
-  `supplierreference` mediumtext, -- not used? always NULL
   `purchaseordernumber` mediumtext, -- not used? always NULL
   `basketno` int(11) default NULL, -- links this order line to a specific basket (aqbasket.basketno)
   `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this order line was last modified
index 78e79d3..6025447 100755 (executable)
@@ -9573,6 +9573,15 @@ if( CheckVersion($DBversion) ){
     $dbh->do("INSERT INTO systempreferences (variable, explanation, type) VALUES('DefaultLongOverdueLostValue', 'Set the LOST value of an item to n when the item has been overdue for more than defaultlongoverduedays days.', 'integer')");
     $dbh->do("INSERT INTO systempreferences (variable, explanation, type) VALUES('DefaultLongOverdueDays', 'Set the LOST value of an item when the item has been overdue for more than n days.',  'integer')");
     print "Upgrade to $DBversion done (Bug 8337: System preferences for longoverdue cron)\n";
+}
+
+$DBversion = "3.17.00.XXX";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q|
+        ALTER TABLE aqorders DROP COLUMN supplierreference;
+    |);
+
+    print "Upgrade to $DBversion done (Bug 11008 - DROP column aqorders.supplierreference)\n";
     SetVersion($DBversion);
 }
 
index 427cdfe..aa09a3a 100755 (executable)
@@ -338,7 +338,6 @@ my @expectedfields = qw(
   unitprice
   quantityreceived
   datecancellationprinted
-  supplierreference
   purchaseordernumber
   basketno
   timestamp
@@ -456,7 +455,6 @@ my @base_expectedfields = qw(
   biblioitemnumber
   datereceived
   orderstatus
-  supplierreference
   agerestriction
   budget_branchcode
   gstrate
@@ -577,7 +575,6 @@ ok(
   creationdate
   datereceived
   orderstatus
-  supplierreference
   isbn
   copyrightdate
   gstrate