Bugzilla – Attachment 190381 Details for
Bug 41409
Streetnumber has a different data type in borrower_modifications
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41409: Convert streetnumber and B_streetnumber to tinytext
Bug-41409-Convert-streetnumber-and-Bstreetnumber-t.patch (text/plain), 3.34 KB, created by
Matt Blenkinsop
on 2025-12-09 17:27:28 UTC
(
hide
)
Description:
Bug 41409: Convert streetnumber and B_streetnumber to tinytext
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2025-12-09 17:27:28 UTC
Size:
3.34 KB
patch
obsolete
>From 6662dd789a893ef4779d8d0820c4c974a76e4f71 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> >Date: Tue, 9 Dec 2025 17:25:09 +0000 >Subject: [PATCH] Bug 41409: Convert streetnumber and B_streetnumber to > tinytext > >Test plan: >1) Run 'updatedatabase' >2) No errors should be thrown > >Sponsored-by: Cheshire West and Chester Council >--- > .../bug_41409-standardise_streetnumber.pl | 34 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 4 +-- > 2 files changed, 36 insertions(+), 2 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_41409-standardise_streetnumber.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_41409-standardise_streetnumber.pl b/installer/data/mysql/atomicupdate/bug_41409-standardise_streetnumber.pl >new file mode 100755 >index 00000000000..0c5510b5d52 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_41409-standardise_streetnumber.pl >@@ -0,0 +1,34 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "41409", >+ description => "Convert streetnumber to tinytext in borrower_modifications", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ if ( TableExists('borrower_modifications') ) { >+ if ( column_exists( 'borrower_modifications', 'streetnumber' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE borrower_modifications CHANGE COLUMN streetnumber streetnumber tinytext DEFAULT NULL COMMENT 'the house number for your patron/borrower''s primary address'; >+ } >+ ); >+ say_success( >+ $out, >+ q{Column 'borrower_modifications.streetnumber' renamed to 'borrower_modifications.streetnumber'} >+ ); >+ $dbh->do( >+ q{ >+ ALTER TABLE borrower_modifications CHANGE COLUMN B_streetnumber B_streetnumber tinytext DEFAULT NULL COMMENT 'the house number for your patron/borrower''s alternate address'; >+ } >+ ); >+ say_success( >+ $out, >+ q{Column 'borrower_modifications.B_streetnumber' renamed to 'borrower_modifications.B_streetnumber'} >+ ); >+ } >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 688c7883f0d..e65b2af7ca4 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1417,7 +1417,7 @@ CREATE TABLE `borrower_modifications` ( > `othernames` longtext DEFAULT NULL, > `initials` mediumtext DEFAULT NULL, > `pronouns` longtext DEFAULT NULL, >- `streetnumber` varchar(10) DEFAULT NULL, >+ `streetnumber` tinytext DEFAULT NULL, > `streettype` varchar(50) DEFAULT NULL, > `address` longtext DEFAULT NULL, > `address2` mediumtext DEFAULT NULL, >@@ -1431,7 +1431,7 @@ CREATE TABLE `borrower_modifications` ( > `fax` longtext DEFAULT NULL, > `emailpro` mediumtext DEFAULT NULL, > `phonepro` mediumtext DEFAULT NULL, >- `B_streetnumber` varchar(10) DEFAULT NULL, >+ `B_streetnumber` tinytext DEFAULT NULL, > `B_streettype` varchar(50) DEFAULT NULL, > `B_address` varchar(100) DEFAULT NULL, > `B_address2` mediumtext DEFAULT NULL, >-- >2.50.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 41409
:
190378
|
190381
|
190419
|
190682