View | Details | Raw Unified | Return to bug 41409
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_41409-standardise_streetnumber.pl (+34 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "41409",
6
    description => "Convert streetnumber to tinytext in borrower_modifications",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        if ( TableExists('borrower_modifications') ) {
12
            if ( column_exists( 'borrower_modifications', 'streetnumber' ) ) {
13
                $dbh->do(
14
                    q{
15
                        ALTER TABLE borrower_modifications CHANGE COLUMN streetnumber streetnumber tinytext DEFAULT NULL COMMENT 'the house number for your patron/borrower''s primary address';
16
                    }
17
                );
18
                say_success(
19
                    $out,
20
                    q{Column 'borrower_modifications.streetnumber' renamed to 'borrower_modifications.streetnumber'}
21
                );
22
                $dbh->do(
23
                    q{
24
                        ALTER TABLE borrower_modifications CHANGE COLUMN B_streetnumber B_streetnumber tinytext DEFAULT NULL COMMENT 'the house number for your patron/borrower''s alternate address';
25
                    }
26
                );
27
                say_success(
28
                    $out,
29
                    q{Column 'borrower_modifications.B_streetnumber' renamed to 'borrower_modifications.B_streetnumber'}
30
                );
31
            }
32
        }
33
    },
34
};
(-)a/installer/data/mysql/kohastructure.sql (-3 / +2 lines)
Lines 1417-1423 CREATE TABLE `borrower_modifications` ( Link Here
1417
  `othernames` longtext DEFAULT NULL,
1417
  `othernames` longtext DEFAULT NULL,
1418
  `initials` mediumtext DEFAULT NULL,
1418
  `initials` mediumtext DEFAULT NULL,
1419
  `pronouns` longtext DEFAULT NULL,
1419
  `pronouns` longtext DEFAULT NULL,
1420
  `streetnumber` varchar(10) DEFAULT NULL,
1420
  `streetnumber` tinytext DEFAULT NULL,
1421
  `streettype` varchar(50) DEFAULT NULL,
1421
  `streettype` varchar(50) DEFAULT NULL,
1422
  `address` longtext DEFAULT NULL,
1422
  `address` longtext DEFAULT NULL,
1423
  `address2` mediumtext DEFAULT NULL,
1423
  `address2` mediumtext DEFAULT NULL,
Lines 1431-1437 CREATE TABLE `borrower_modifications` ( Link Here
1431
  `fax` longtext DEFAULT NULL,
1431
  `fax` longtext DEFAULT NULL,
1432
  `emailpro` mediumtext DEFAULT NULL,
1432
  `emailpro` mediumtext DEFAULT NULL,
1433
  `phonepro` mediumtext DEFAULT NULL,
1433
  `phonepro` mediumtext DEFAULT NULL,
1434
  `B_streetnumber` varchar(10) DEFAULT NULL,
1434
  `B_streetnumber` tinytext DEFAULT NULL,
1435
  `B_streettype` varchar(50) DEFAULT NULL,
1435
  `B_streettype` varchar(50) DEFAULT NULL,
1436
  `B_address` varchar(100) DEFAULT NULL,
1436
  `B_address` varchar(100) DEFAULT NULL,
1437
  `B_address2` mediumtext DEFAULT NULL,
1437
  `B_address2` mediumtext DEFAULT NULL,
1438
- 

Return to bug 41409