Bugzilla – Attachment 127052 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.55 KB, created by
Marcel de Rooy
on 2021-10-28 12:25:36 UTC
(
hide
)
Description:
Bug 29336: Database revision
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-10-28 12:25:36 UTC
Size:
2.55 KB
patch
obsolete
>From 31704ade5ae901d0ef80288c3cb447643c381359 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 >Content-Type: text/plain; charset=utf-8 > >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> >--- > .../data/mysql/atomicupdate/bug_29336.pl | 23 +++++++++++++++++++ > 1 file changed, 23 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 0000000000..0cf0788e7d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_29336.pl >@@ -0,0 +1,23 @@ >+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|, >+ ); >+my $i=1; >+ foreach my $sql ( @sql_statements ) { >+ $dbh->do( $sql ); >+print "$i\n"; $i++; >+ } >+ }, >+} >-- >2.20.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