From e41f9c403683b61bb7d0cca3ebc1cf8b77844f13 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 26 Mar 2018 14:41:06 +0200 Subject: [PATCH] Bug 20472: Add new fields article_requests.format and urls Content-Type: text/plain; charset=utf-8 The field 'format' will allow to make a distinction between requests for photocopies and digital scans. The field 'urls' will be used to save the URLs that allow the client to download the scanned materials. Test plan: Run new install or upgrade existing install with atomic update. Signed-off-by: Marcel de Rooy --- installer/data/mysql/atomicupdate/bug_20472a.perl | 9 +++++++++ installer/data/mysql/kohastructure.sql | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_20472a.perl diff --git a/installer/data/mysql/atomicupdate/bug_20472a.perl b/installer/data/mysql/atomicupdate/bug_20472a.perl new file mode 100644 index 0000000000..a789245112 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_20472a.perl @@ -0,0 +1,9 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do(q| + ALTER TABLE article_requests + ADD COLUMN `format` enum('PHOTOCOPY', 'SCAN') NOT NULL DEFAULT 'PHOTOCOPY' AFTER notes, + ADD COLUMN `urls` MEDIUMTEXT AFTER format + |); + NewVersion( $DBversion, 20472, "Add columns format and urls in article_requests table"); +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index c7e584e1e6..90c786f600 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -4078,6 +4078,8 @@ CREATE TABLE `article_requests` ( `patron_notes` MEDIUMTEXT, `status` enum('PENDING','PROCESSING','COMPLETED','CANCELED') NOT NULL DEFAULT 'PENDING', `notes` MEDIUMTEXT, + `format` enum('PHOTOCOPY', 'SCAN') NOT NULL DEFAULT 'PHOTOCOPY', + `urls` MEDIUMTEXT, -- One or more URLs for downloading scanned articles, separated by semicolons `created_on` timestamp NULL DEFAULT NULL, -- Be careful with two timestamps in one table not allowing NULL `updated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), -- 2.11.0