Bug 20472: Add new fields article_requests.format and urls
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 26 Mar 2018 12:41:06 +0000 (14:41 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 12 Jul 2021 13:47:34 +0000 (15:47 +0200)
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 <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
installer/data/mysql/atomicupdate/bug_20472a.perl [new file with mode: 0644]

diff --git a/installer/data/mysql/atomicupdate/bug_20472a.perl b/installer/data/mysql/atomicupdate/bug_20472a.perl
new file mode 100644 (file)
index 0000000..a789245
--- /dev/null
@@ -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");
+}