From fa7f7f843267ea7f6bb6622f451908f63f728cc7 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Thu, 17 May 2018 10:47:52 +0100 Subject: [PATCH] Bug 20772: Add 'illrequest.price_paid' This patch adds a 'price_paid' column to 'illrequests' Signed-off-by: Barry Cannon Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- ...bug_20772-add-price_paid_column_to_illrequests.perl | 10 ++++++++++ installer/data/mysql/kohastructure.sql | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_20772-add-price_paid_column_to_illrequests.perl diff --git a/installer/data/mysql/atomicupdate/bug_20772-add-price_paid_column_to_illrequests.perl b/installer/data/mysql/atomicupdate/bug_20772-add-price_paid_column_to_illrequests.perl new file mode 100644 index 0000000000..5d32fb7914 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_20772-add-price_paid_column_to_illrequests.perl @@ -0,0 +1,10 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + + if( !column_exists( 'illrequests', 'price_paid' ) ) { + $dbh->do( "ALTER TABLE illrequests ADD COLUMN price_paid varchar(20) DEFAULT NULL" ); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 20772 - Add illrequest.price_paid column)\n"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index d01b2cb062..46e4459e89 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -4153,7 +4153,8 @@ CREATE TABLE illrequests ( completed date DEFAULT NULL, -- Date the request was completed medium varchar(30) DEFAULT NULL, -- The Koha request type accessurl varchar(500) DEFAULT NULL, -- Potential URL for accessing item - cost varchar(20) DEFAULT NULL, -- Cost of request + cost varchar(20) DEFAULT NULL, -- Quotes cost of request + price_paid varchar(20) DEFAULT NULL, -- Final cost of request notesopac MEDIUMTEXT DEFAULT NULL, -- Patron notes attached to request notesstaff MEDIUMTEXT DEFAULT NULL, -- Staff notes attached to request orderid varchar(50) DEFAULT NULL, -- Backend id attached to request -- 2.19.1