Bugzilla – Attachment 168435 Details for
Bug 36453
BlockExpiredPatronOpacActions should allow multiple actions options
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36453: (QA follow-up) Address upgraded instances
Bug-36453-QA-follow-up-Address-upgraded-instances.patch (text/plain), 2.38 KB, created by
Pedro Amorim
on 2024-07-03 10:39:51 UTC
(
hide
)
Description:
Bug 36453: (QA follow-up) Address upgraded instances
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-07-03 10:39:51 UTC
Size:
2.38 KB
patch
obsolete
>From a6b1c98e56a9fbac8e4eb3ec28185759f4d3ff61 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Wed, 3 Jul 2024 10:36:56 +0000 >Subject: [PATCH] Bug 36453: (QA follow-up) Address upgraded instances > >To test: >1) Apply only this patch, skipping the next one (patch 'Use varchar instead of mediumtext') >2) Run ktd up with default DBMS mariadb:10.5: ktd up >3) Confirm the database state is wrong: > DESC categories BlockExpiredPatronOpacActions; > ^ This should return type = mediumtext >4) Run updatedatabase, make sure green success message shows > Running the above query again will show type = varchar(128) >5) Run updatedatabase again, notice blue info message notifies its already varchar >--- > .../data/mysql/atomicupdate/bug_36453.pl | 29 +++++++++++++++++++ > 1 file changed, 29 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_36453.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_36453.pl b/installer/data/mysql/atomicupdate/bug_36453.pl >new file mode 100755 >index 0000000000..4d2fcad3bb >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_36453.pl >@@ -0,0 +1,29 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_failure say_success say_info); >+ >+return { >+ bug_number => "36453", >+ description => "Update BlockExpiredPatronOpacActions where 240600002.pl was already run", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ my $sth = $dbh->prepare( >+ q{ >+ SELECT DATA_TYPE >+ FROM INFORMATION_SCHEMA.COLUMNS >+ WHERE TABLE_NAME = 'categories' and COLUMN_NAME = 'BlockExpiredPatronOpacActions' >+ } >+ ); >+ $sth->execute; >+ my $data_type = $sth->fetchrow(); >+ >+ if( $data_type eq 'mediumtext' ) { >+ $dbh->do( >+ "ALTER TABLE categories MODIFY BlockExpiredPatronOpacActions varchar(128) NOT NULL DEFAULT 'follow_syspref_BlockExpiredPatronOpacActions' COMMENT 'specific actions expired patrons of this category are blocked from performing or if the BlockExpiredPatronOpacActions system preference is to be followed'" >+ ) and say_success( $out, "Updated categories.BlockExpiredPatronOpacActions to varchar(128)" ); >+ }else{ >+ say_info( $out, "categories.BlockExpiredPatronOpacActions already varchar(128)" ); >+ } >+ }, >+}; >-- >2.39.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 36453
:
164042
|
164043
|
164044
|
164045
|
164046
|
164047
|
164048
|
164762
|
164763
|
164764
|
164765
|
164766
|
164767
|
164768
|
165413
|
165414
|
165454
|
167461
|
167462
|
167463
|
167464
|
167465
|
167466
|
167467
|
167468
|
167469
|
167470
|
167471
|
167472
|
167473
|
167474
|
167475
|
167476
|
167477
|
167478
|
167479
|
167480
| 168435 |
168436