Bug 20777: Remove unused accountlines.dispute field
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 17 May 2018 13:53:55 +0000 (10:53 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Sat, 15 Sep 2018 21:44:32 +0000 (21:44 +0000)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

installer/data/mysql/atomicupdate/bug_20777_accountlines_dispute.perl [new file with mode: 0644]
installer/data/mysql/kohastructure.sql

diff --git a/installer/data/mysql/atomicupdate/bug_20777_accountlines_dispute.perl b/installer/data/mysql/atomicupdate/bug_20777_accountlines_dispute.perl
new file mode 100644 (file)
index 0000000..4317603
--- /dev/null
@@ -0,0 +1,13 @@
+$DBversion = 'XXX';
+if( CheckVersion( $DBversion ) ) {
+
+    if ( column_exists( 'accountlines', 'dispute' ) ) {
+        $dbh->do(q{
+            ALTER TABLE `accountlines`
+                DROP COLUMN `dispute`
+        });
+    }
+
+    SetVersion( $DBversion );
+    print "Upgrade to $DBversion done (Bug 20777 - Remove unused field accountlines.dispute)\n";
+}
index da6d7f6..60d03ef 100644 (file)
@@ -2680,7 +2680,6 @@ CREATE TABLE `accountlines` (
   `date` date default NULL,
   `amount` decimal(28,6) default NULL,
   `description` LONGTEXT,
-  `dispute` LONGTEXT,
   `accounttype` varchar(5) default NULL,
   `payment_type` varchar(80) default NULL, -- optional authorised value PAYMENT_TYPE
   `amountoutstanding` decimal(28,6) default NULL,