Bugzilla – Attachment 185344 Details for
Bug 11300
Add a new authority linker which searches for authority links on a Z39.50 server.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Bug 40337: Remove test of datatype
Bug-40337-Remove-test-of-datatype.patch (text/plain), 4.19 KB, created by
Hammat wele
on 2025-08-12 16:22:33 UTC
(
hide
)
Description:
Bug 40337: Remove test of datatype
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2025-08-12 16:22:33 UTC
Size:
4.19 KB
patch
obsolete
>From 3018ecbf19f8ff3850a74cb08cd88718fc3c6803 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 21 Jul 2025 10:16:52 +0200 >Subject: [PATCH] Bug 40337: Remove test of datatype > >Keep the UPDATE to adjust bad data however. > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> > >https://bugs.koha-community.org/show_bug.cgi?id=11300 >--- > installer/data/mysql/db_revs/250600003.pl | 66 ++++++----------------- > 1 file changed, 15 insertions(+), 51 deletions(-) > >diff --git a/installer/data/mysql/db_revs/250600003.pl b/installer/data/mysql/db_revs/250600003.pl >index da2e544841c..e87c5cba156 100755 >--- a/installer/data/mysql/db_revs/250600003.pl >+++ b/installer/data/mysql/db_revs/250600003.pl >@@ -8,82 +8,46 @@ return { > my ($args) = @_; > my ( $dbh, $out ) = @$args{qw(dbh out)}; > >- my $col_type_borrowers = $dbh->selectrow_array( >+ $dbh->do( > q{ >- SELECT COLUMN_TYPE >- FROM INFORMATION_SCHEMA.COLUMNS >- WHERE TABLE_SCHEMA = DATABASE() >- AND TABLE_NAME = 'borrowers' >- AND COLUMN_NAME = 'checkprevcheckout' >- } >- ); >- >- if ( $col_type_borrowers !~ /^enum/i ) { >- $dbh->do( >- q{ > UPDATE borrowers > SET checkprevcheckout = 'inherit' > WHERE checkprevcheckout NOT IN ('yes','no','inherit'); > } >- ); >- $dbh->do( >- q{ >+ ); >+ $dbh->do( >+ q{ > ALTER TABLE borrowers > MODIFY COLUMN `checkprevcheckout` enum('yes', 'no', 'inherit') NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for this patron if this item has previously been checked out to this patron if ''yes'', not if ''no'', defer to category setting if ''inherit''.' > } >- ); >- } >- >- my $col_type_categories = $dbh->selectrow_array( >- q{ >- SELECT COLUMN_TYPE >- FROM INFORMATION_SCHEMA.COLUMNS >- WHERE TABLE_SCHEMA = DATABASE() >- AND TABLE_NAME = 'categories' >- AND COLUMN_NAME = 'checkprevcheckout' >- } > ); > >- if ( $col_type_categories !~ /^enum/i ) { >- $dbh->do( >- q{ >+ $dbh->do( >+ q{ > UPDATE categories > SET checkprevcheckout = 'inherit' > WHERE checkprevcheckout NOT IN ('yes','no','inherit'); > } >- ); >- $dbh->do( >- q{ >+ ); >+ $dbh->do( >+ q{ > ALTER TABLE categories > MODIFY COLUMN `checkprevcheckout` enum('yes', 'no', 'inherit') NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for this patron category if this item has previously been checked out to this patron if ''yes'', not if ''no'', defer to syspref setting if ''inherit''.' > } >- ); >- } >- >- my $col_type_deletedborrowers = $dbh->selectrow_array( >- q{ >- SELECT COLUMN_TYPE >- FROM INFORMATION_SCHEMA.COLUMNS >- WHERE TABLE_SCHEMA = DATABASE() >- AND TABLE_NAME = 'deletedborrowers' >- AND COLUMN_NAME = 'checkprevcheckout' >- } > ); > >- if ( $col_type_deletedborrowers !~ /^enum/i ) { >- $dbh->do( >- q{ >+ $dbh->do( >+ q{ > UPDATE deletedborrowers > SET checkprevcheckout = 'inherit' > WHERE checkprevcheckout NOT IN ('yes','no','inherit'); > } >- ); >- $dbh->do( >- q{ >+ ); >+ $dbh->do( >+ q{ > ALTER TABLE deletedborrowers > MODIFY COLUMN `checkprevcheckout` enum('yes', 'no', 'inherit') NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for this patron if this item has previously been checked out to this patron if ''yes'', not if ''no'', defer to category setting if ''inherit''.' > } >- ); >- } >+ ); > }, > }; >-- >2.34.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 Raw
Actions:
View
Attachments on
bug 11300
:
23147
|
37918
|
37974
|
37975
|
37989
|
39649
|
45324
|
56542
|
56543
|
60999
|
67165
|
69096
|
69204
|
79400
|
94819
|
94875
|
111801
|
111896
|
115217
|
133496
|
136404
|
138029
|
141168
|
143292
|
148824
|
151079
|
151476
|
151477
|
155602
|
155603
|
159741
|
159742
|
163946
|
163947
|
171304
|
171689
|
185343
|
185344
|
185345