@@ -, +, @@ --- installer/data/mysql/atomicupdate/bug_31503.pl | 16 ++++++++++++++++ installer/data/mysql/mandatory/auth_val_cat.sql | 1 + 2 files changed, 17 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_31503.pl --- a/installer/data/mysql/atomicupdate/bug_31503.pl +++ a/installer/data/mysql/atomicupdate/bug_31503.pl @@ -0,0 +1,16 @@ +use Modern::Perl; + +return { + bug_number => 31503, + description => "Adjust patron_consent.type and add AV category", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + $dbh->do(q{ +ALTER TABLE patron_consent CHANGE COLUMN `type` `type` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron consent type; controlled by authorised values'; + }); + $dbh->do(q{ +INSERT IGNORE INTO authorised_value_categories (category_name) VALUES ('PATRON_CONSENT'); + }); + }, +}; --- a/installer/data/mysql/mandatory/auth_val_cat.sql +++ a/installer/data/mysql/mandatory/auth_val_cat.sql @@ -19,6 +19,7 @@ INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) ('PA_CLASS', 0), ('HOLD_CANCELLATION', 0), ('ROADTYPE', 0), + ('PATRON_CONSENT', 0), ('AR_CANCELLATION', 0); INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) --