From 755edcd12d9e34107ceddcdb60337baf7014cf38 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 14 Mar 2019 12:14:17 +0000 Subject: [PATCH] Bug 22512: Add status field to accountlines Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall --- .../data/mysql/atomicupdate/bug_22512.perl | 18 ++++++++++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 19 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_22512.perl diff --git a/installer/data/mysql/atomicupdate/bug_22512.perl b/installer/data/mysql/atomicupdate/bug_22512.perl new file mode 100644 index 0000000000..206a829d93 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_22512.perl @@ -0,0 +1,18 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if ( CheckVersion($DBversion) ) { + + if ( !column_exists( 'accountlines', 'status' ) ) { + $dbh->do( + qq{ + ALTER TABLE `accountlines` + ADD + `status` varchar(16) DEFAULT NULL + AFTER + `accounttype` + } + ); + } + + SetVersion($DBversion); + print "Upgrade to $DBversion done (Bug 22512 - Add status to accountlines)\n"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index b7356ad4a1..ca76862587 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2679,6 +2679,7 @@ CREATE TABLE `accountlines` ( `amount` decimal(28,6) default NULL, `description` LONGTEXT, `accounttype` varchar(5) default NULL, + `status` varchar(16) 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, -- 2.17.2 (Apple Git-113)