Bugzilla – Attachment 140666 Details for
Bug 31503
Allow several consent types on the consents tab of OPAC account page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31503: Adjust db column patron_consent.type
Bug-31503-Adjust-db-column-patronconsenttype.patch (text/plain), 2.10 KB, created by
Marcel de Rooy
on 2022-09-15 13:56:08 UTC
(
hide
)
Description:
Bug 31503: Adjust db column patron_consent.type
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-09-15 13:56:08 UTC
Size:
2.10 KB
patch
obsolete
>From 948392981d98b617324f9890dd48fe8a60669f3d Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 2 Sep 2022 06:17:28 +0000 >Subject: [PATCH] Bug 31503: Adjust db column patron_consent.type >Content-Type: text/plain; charset=utf-8 > >We want to control this field now via authorised values. An ENUM >is too restrictive. >A foreign key on the values of authorised_value for category >'PATRON_CONSENT' is not possible. >This will do for now. > >Test plan: >Run dbrev. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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 > >diff --git a/installer/data/mysql/atomicupdate/bug_31503.pl b/installer/data/mysql/atomicupdate/bug_31503.pl >new file mode 100755 >index 0000000000..8552bd37e2 >--- /dev/null >+++ b/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'); >+ }); >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/auth_val_cat.sql b/installer/data/mysql/mandatory/auth_val_cat.sql >index aef65fb807..e2ec9d590d 100644 >--- a/installer/data/mysql/mandatory/auth_val_cat.sql >+++ b/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 ) >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31503
:
140047
|
140048
|
140049
|
140050
|
140080
|
140081
|
140082
|
140083
|
140084
|
140085
|
140087
|
140088
|
140089
|
140090
|
140666
|
140667
|
140668
|
140669
|
140670
|
140671
|
140672
|
141216
|
141217
|
141218
|
141219
|
141220
|
141221
|
141222
|
141263
|
141264
|
141265
|
141266
|
141267
|
141268
|
141269
|
141302
|
141570
|
155000
|
155001
|
155002
|
155003
|
155177
|
155178
|
155179
|
155180
|
155189
|
155190
|
155191
|
155656
|
155657
|
155658
|
155659
|
155660
|
155661
|
155691
|
155694
|
155783
|
155784
|
155785
|
155786
|
155787
|
155788
|
155789
|
155790
|
155791
|
157117
|
157118
|
157119
|
157120
|
157121
|
157122
|
157123
|
157124
|
157125
|
157126
|
157773
|
157774
|
157775
|
157776
|
157777
|
157778
|
157779
|
157780
|
157781
|
157782
|
157783