Bug 11007: Drop column aqorders.cancelledby
authorJonathan Druart <jonathan.druart@biblibre.com>
Fri, 18 Jul 2014 10:48:57 +0000 (12:48 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 28 Oct 2014 12:31:14 +0000 (09:31 -0300)
It seems that this column has never been used.

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

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I couldn't find any trace of this column being used.
Passes tests and QA script, updates all necessary files.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl
t/db_dependent/Acquisition.t

index 6db41e7..38435b9 100644 (file)
@@ -3024,7 +3024,6 @@ CREATE TABLE `aqorders` ( -- information related to the basket line items
   `freight` decimal(28,6) default NULL, -- shipping costs (not used)
   `unitprice` decimal(28,6) default NULL, -- the actual cost entered when receiving this line item
   `quantityreceived` smallint(6) NOT NULL default 0, -- the quantity that have been received so far
-  `cancelledby` varchar(10) default NULL, -- not used? always NULL
   `datecancellationprinted` date default NULL, -- the date the line item was deleted
   `order_internalnote` mediumtext, -- notes related to this order line, made for staff
   `order_vendornote` mediumtext, -- notes related to this order line, made for vendor
index 57464ba..0c27705 100755 (executable)
@@ -8867,6 +8867,16 @@ if ( CheckVersion($DBversion) ) {
     SetVersion($DBversion);
 }
 
+$DBversion = "3.17.00.XXX";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q|
+        ALTER TABLE aqorders DROP COLUMN cancelledby;
+    |);
+
+    print "Upgrade to $DBversion done (Bug 11007 - DROP column aqorders.cancelledby)\n";
+    SetVersion($DBversion);
+}
+
 =head1 FUNCTIONS
 
 =head2 TableExists($table)
index 1570480..1a559b8 100755 (executable)
@@ -324,7 +324,6 @@ my @expectedfields = qw(
   freight
   unitprice
   quantityreceived
-  cancelledby
   datecancellationprinted
   supplierreference
   purchaseordernumber
@@ -400,7 +399,6 @@ my @base_expectedfields = qw(
   ecost
   uncertainprice
   marc
-  cancelledby
   url
   isbn
   copyrightdate
@@ -565,7 +563,6 @@ ok(
   datereceived
   orderstatus
   supplierreference
-  cancelledby
   isbn
   copyrightdate
   gstrate