Bug 21730: Add missing PA_CLASS authorized values categories
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 31 Oct 2018 20:42:43 +0000 (17:42 -0300)
committerJesse Maseto <jesse@bywatersolution.com>
Tue, 18 Dec 2018 13:47:49 +0000 (13:47 +0000)
PA_CLASS is missing from the list of AV category

Test plan:
Execute the update DB entry
Confirm that you now have PA_CLASS in the AV category list

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

installer/data/mysql/atomicupdate/bug_21730.perl [new file with mode: 0644]
installer/data/mysql/mandatory/auth_val_cat.sql

diff --git a/installer/data/mysql/atomicupdate/bug_21730.perl b/installer/data/mysql/atomicupdate/bug_21730.perl
new file mode 100644 (file)
index 0000000..cb8db7b
--- /dev/null
@@ -0,0 +1,9 @@
+$DBversion = 'XXX';  # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+    # you can use $dbh here like:
+
+    $dbh->do( "INSERT IGNORE INTO authorised_value_categories (category_name) VALUES ('PA_CLASS');");
+
+    SetVersion( $DBversion );
+    print "Upgrade to $DBversion done (Bug 21730: Add new authorised value category PA_CLASS)\n";
+}
index 6fff954..696bef2 100644 (file)
@@ -16,6 +16,7 @@ INSERT IGNORE INTO authorised_value_categories( category_name )
     ('TERM'),
     ('ITEMTYPECAT'),
     ('PAYMENT_TYPE'),
+    ('PA_CLASS'),
     ('ROADTYPE');
 
 INSERT IGNORE INTO authorised_value_categories( category_name )