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
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 366ce3f08e)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
This commit is contained in:
parent
fcf6199705
commit
8a546ea580
|
|
@ -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'}
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue