From 657b1a6bef688da97f95dc7c1269374a919e5103 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 17 May 2018 10:53:55 -0300 Subject: [PATCH] Bug 20777: Remove unused accountlines.dispute field Signed-off-by: Tomas Cohen Arazi Signed-off-by: Mark Tompsett --- .../mysql/atomicupdate/bug_20777_accountlines_dispute.perl | 13 +++++++++++++ installer/data/mysql/kohastructure.sql | 1 - 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_20777_accountlines_dispute.perl 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 index 0000000..4317603 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_20777_accountlines_dispute.perl @@ -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"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3048ade..f348931 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2679,7 +2679,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, -- 2.7.4