Bugzilla – Attachment 129188 Details for
Bug 29336
Some authorised_value FKs are too short
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29336: Database revision
Bug-29336-Database-revision.patch (text/plain), 2.60 KB, created by
Jonathan Druart
on 2022-01-07 15:05:41 UTC
(
hide
)
Description:
Bug 29336: Database revision
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-01-07 15:05:41 UTC
Size:
2.60 KB
patch
obsolete
>From 4e0e221eacd537d03a751040571d1f5a63c66a48 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 28 Oct 2021 12:11:07 +0000 >Subject: [PATCH] Bug 29336: Database revision > >Resizes the six fields identified earlier: > >additional_fields.authorised_value_category 16=>32 >auth_subfield_structure.authorised_value 10=>32 >auth_tag_structure.authorised_value 10=>32 >club_template_enrollment_fields.authorised_value_category 16=>32 >club_template_fields.authorised_value_category 16=>32 >marc_tag_structure.authorised_value 10=>32 > >Test plan: >Run dbrev, check database. >Bonus: Connect an AV category with a long name to a authority subfield. >Check if you see its values in the authority editor. >(This was the way I found the problem.) > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../data/mysql/atomicupdate/bug_29336.pl | 21 +++++++++++++++++++ > 1 file changed, 21 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_29336.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_29336.pl b/installer/data/mysql/atomicupdate/bug_29336.pl >new file mode 100755 >index 00000000000..235ab117d6d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_29336.pl >@@ -0,0 +1,21 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => 29336, >+ description => "Resize authorised value category fields to 32 chars", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ my @sql_statements = ( >+ q|ALTER TABLE additional_fields CHANGE authorised_value_category authorised_value_category varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ''|, >+ q|ALTER TABLE auth_subfield_structure CHANGE authorised_value authorised_value varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL|, >+ q|ALTER TABLE auth_tag_structure CHANGE authorised_value authorised_value varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL|, >+ q|ALTER TABLE club_template_enrollment_fields CHANGE authorised_value_category authorised_value_category varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL|, >+ q|ALTER TABLE club_template_fields CHANGE authorised_value_category authorised_value_category varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL|, >+ q|ALTER TABLE marc_tag_structure CHANGE authorised_value authorised_value varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL|, >+ ); >+ foreach my $sql ( @sql_statements ) { >+ $dbh->do( $sql ); >+ } >+ }, >+} >-- >2.25.1
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 29336
:
127051
|
127052
|
127053
|
127169
|
127170
|
127171
|
127172
|
128655
|
128656
|
129187
| 129188 |
129189