From c44a207f373f9ffd537f6385b3877730273b73ea Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 15 Mar 2019 08:43:12 +0000 Subject: [PATCH] Bug 22516: Database update Signed-off-by: Martin Renvoize --- installer/data/mysql/atomicupdate/bug_22516.perl | 10 ++++++++++ installer/data/mysql/kohastructure.sql | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_22516.perl diff --git a/installer/data/mysql/atomicupdate/bug_22516.perl b/installer/data/mysql/atomicupdate/bug_22516.perl new file mode 100644 index 0000000000..e40c983ac7 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_22516.perl @@ -0,0 +1,10 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + + if ( column_exists( 'accountlines', 'lastincrement' ) ) { + $dbh->do("ALTER TABLE `accountlines` DROP COLUMN `lastincrement`"); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 22516 - Drop deprecated accountlines.lastincrement field)\n"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 4778e034bc..1195b8925f 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2681,7 +2681,6 @@ CREATE TABLE `accountlines` ( `accounttype` varchar(5) default NULL, `payment_type` varchar(80) default NULL, -- optional authorised value PAYMENT_TYPE `amountoutstanding` decimal(28,6) default NULL, - `lastincrement` decimal(28,6) default NULL, `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `note` MEDIUMTEXT NULL default NULL, `manager_id` int(11) NULL, -- 2.20.1