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

(-)a/installer/data/mysql/atomicupdate/bug_24986.perl (+22 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
4
    for my $f (qw( streetnumber streettype zipcode mobile B_streetnumber B_streettype B_zipcode ) ) {
5
        $dbh->do(qq|
6
            ALTER TABLE borrowers MODIFY $f TINYTEXT DEFAULT NULL
7
        |);
8
        $dbh->do(qq|
9
            ALTER TABLE deletedborrowers MODIFY $f TINYTEXT DEFAULT NULL
10
        |);
11
    }
12
    for my $f ( qw( B_address altcontactfirstname altcontactsurname altcontactaddress1 altcontactaddress2 altcontactaddress3 altcontactzipcode altcontactphone ) ) {
13
        $dbh->do(qq|
14
            ALTER TABLE borrowers MODIFY $f MEDIUMTEXT DEFAULT NULL
15
        |);
16
        $dbh->do(qq|
17
            ALTER TABLE deletedborrowers MODIFY $f MEDIUMTEXT DEFAULT NULL
18
        |);
19
    }
20
21
    NewVersion( $DBversion, 24986, "Switch borrowers address related fields to TINYTEXT or MEDIUMTEXT");
22
}
(-)a/installer/data/mysql/kohastructure.sql (-31 / +30 lines)
Lines 537-563 CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower Link Here
537
  `title` LONGTEXT, -- patron/borrower's title, for example: Mr. or Mrs.
537
  `title` LONGTEXT, -- patron/borrower's title, for example: Mr. or Mrs.
538
  `othernames` LONGTEXT, -- any other names associated with the patron/borrower
538
  `othernames` LONGTEXT, -- any other names associated with the patron/borrower
539
  `initials` MEDIUMTEXT, -- initials for your patron/borrower
539
  `initials` MEDIUMTEXT, -- initials for your patron/borrower
540
  `streetnumber` varchar(10) default NULL, -- the house number for your patron/borrower's primary address
540
  `streetnumber` TINYTEXT default NULL, -- the house number for your patron/borrower's primary address
541
  `streettype` varchar(50) default NULL, -- the street type (Rd., Blvd, etc) for your patron/borrower's primary address
541
  `streettype` TINYTEXT default NULL, -- the street type (Rd., Blvd, etc) for your patron/borrower's primary address
542
  `address` LONGTEXT, -- the first address line for your patron/borrower's primary address
542
  `address` LONGTEXT, -- the first address line for your patron/borrower's primary address
543
  `address2` MEDIUMTEXT, -- the second address line for your patron/borrower's primary address
543
  `address2` MEDIUMTEXT, -- the second address line for your patron/borrower's primary address
544
  `city` LONGTEXT, -- the city or town for your patron/borrower's primary address
544
  `city` LONGTEXT, -- the city or town for your patron/borrower's primary address
545
  `state` MEDIUMTEXT default NULL, -- the state or province for your patron/borrower's primary address
545
  `state` MEDIUMTEXT default NULL, -- the state or province for your patron/borrower's primary address
546
  `zipcode` varchar(25) default NULL, -- the zip or postal code for your patron/borrower's primary address
546
  `zipcode` TINYTEXT default NULL, -- the zip or postal code for your patron/borrower's primary address
547
  `country` MEDIUMTEXT, -- the country for your patron/borrower's primary address
547
  `country` MEDIUMTEXT, -- the country for your patron/borrower's primary address
548
  `email` LONGTEXT, -- the primary email address for your patron/borrower's primary address
548
  `email` LONGTEXT, -- the primary email address for your patron/borrower's primary address
549
  `phone` MEDIUMTEXT, -- the primary phone number for your patron/borrower's primary address
549
  `phone` MEDIUMTEXT, -- the primary phone number for your patron/borrower's primary address
550
  `mobile` varchar(50) default NULL, -- the other phone number for your patron/borrower's primary address
550
  `mobile` TINYTEXT default NULL, -- the other phone number for your patron/borrower's primary address
551
  `fax` LONGTEXT, -- the fax number for your patron/borrower's primary address
551
  `fax` LONGTEXT, -- the fax number for your patron/borrower's primary address
552
  `emailpro` MEDIUMTEXT, -- the secondary email addres for your patron/borrower's primary address
552
  `emailpro` MEDIUMTEXT, -- the secondary email addres for your patron/borrower's primary address
553
  `phonepro` MEDIUMTEXT, -- the secondary phone number for your patron/borrower's primary address
553
  `phonepro` MEDIUMTEXT, -- the secondary phone number for your patron/borrower's primary address
554
  `B_streetnumber` varchar(10) default NULL, -- the house number for your patron/borrower's alternate address
554
  `B_streetnumber` TINYTEXT default NULL, -- the house number for your patron/borrower's alternate address
555
  `B_streettype` varchar(50) default NULL, -- the street type (Rd., Blvd, etc) for your patron/borrower's alternate address
555
  `B_streettype` TINYTEXT default NULL, -- the street type (Rd., Blvd, etc) for your patron/borrower's alternate address
556
  `B_address` varchar(100) default NULL, -- the first address line for your patron/borrower's alternate address
556
  `B_address` MEDIUMTEXT default NULL, -- the first address line for your patron/borrower's alternate address
557
  `B_address2` MEDIUMTEXT default NULL, -- the second address line for your patron/borrower's alternate address
557
  `B_address2` MEDIUMTEXT default NULL, -- the second address line for your patron/borrower's alternate address
558
  `B_city` LONGTEXT, -- the city or town for your patron/borrower's alternate address
558
  `B_city` LONGTEXT, -- the city or town for your patron/borrower's alternate address
559
  `B_state` MEDIUMTEXT default NULL, -- the state for your patron/borrower's alternate address
559
  `B_state` MEDIUMTEXT default NULL, -- the state for your patron/borrower's alternate address
560
  `B_zipcode` varchar(25) default NULL, -- the zip or postal code for your patron/borrower's alternate address
560
  `B_zipcode` TINYTEXT default NULL, -- the zip or postal code for your patron/borrower's alternate address
561
  `B_country` MEDIUMTEXT, -- the country for your patron/borrower's alternate address
561
  `B_country` MEDIUMTEXT, -- the country for your patron/borrower's alternate address
562
  `B_email` MEDIUMTEXT, -- the patron/borrower's alternate email address
562
  `B_email` MEDIUMTEXT, -- the patron/borrower's alternate email address
563
  `B_phone` LONGTEXT, -- the patron/borrower's alternate phone number
563
  `B_phone` LONGTEXT, -- the patron/borrower's alternate phone number
Lines 584-598 CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower Link Here
584
  `contactnote` varchar(255) default NULL, -- a note related to the patron/borrower's alternate address
584
  `contactnote` varchar(255) default NULL, -- a note related to the patron/borrower's alternate address
585
  `sort1` varchar(80) default NULL, -- a field that can be used for any information unique to the library
585
  `sort1` varchar(80) default NULL, -- a field that can be used for any information unique to the library
586
  `sort2` varchar(80) default NULL, -- a field that can be used for any information unique to the library
586
  `sort2` varchar(80) default NULL, -- a field that can be used for any information unique to the library
587
  `altcontactfirstname` varchar(255) default NULL, -- first name of alternate contact for the patron/borrower
587
  `altcontactfirstname` MEDIUMTEXT default NULL, -- first name of alternate contact for the patron/borrower
588
  `altcontactsurname` varchar(255) default NULL, -- surname or last name of the alternate contact for the patron/borrower
588
  `altcontactsurname` MEDIUMTEXT default NULL, -- surname or last name of the alternate contact for the patron/borrower
589
  `altcontactaddress1` varchar(255) default NULL, -- the first address line for the alternate contact for the patron/borrower
589
  `altcontactaddress1` MEDIUMTEXT default NULL, -- the first address line for the alternate contact for the patron/borrower
590
  `altcontactaddress2` varchar(255) default NULL, -- the second address line for the alternate contact for the patron/borrower
590
  `altcontactaddress2` MEDIUMTEXT default NULL, -- the second address line for the alternate contact for the patron/borrower
591
  `altcontactaddress3` varchar(255) default NULL, -- the city for the alternate contact for the patron/borrower
591
  `altcontactaddress3` MEDIUMTEXT default NULL, -- the city for the alternate contact for the patron/borrower
592
  `altcontactstate` MEDIUMTEXT default NULL, -- the state for the alternate contact for the patron/borrower
592
  `altcontactstate` MEDIUMTEXT default NULL, -- the state for the alternate contact for the patron/borrower
593
  `altcontactzipcode` varchar(50) default NULL, -- the zipcode for the alternate contact for the patron/borrower
593
  `altcontactzipcode` MEDIUMTEXT default NULL, -- the zipcode for the alternate contact for the patron/borrower
594
  `altcontactcountry` MEDIUMTEXT default NULL, -- the country for the alternate contact for the patron/borrower
594
  `altcontactcountry` MEDIUMTEXT default NULL, -- the country for the alternate contact for the patron/borrower
595
  `altcontactphone` varchar(50) default NULL, -- the phone number for the alternate contact for the patron/borrower
595
  `altcontactphone` MEDIUMTEXT default NULL, -- the phone number for the alternate contact for the patron/borrower
596
  `smsalertnumber` varchar(50) default NULL, -- the mobile phone number where the patron/borrower would like to receive notices (if SMS turned on)
596
  `smsalertnumber` varchar(50) default NULL, -- the mobile phone number where the patron/borrower would like to receive notices (if SMS turned on)
597
  `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber
597
  `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber
598
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history  KEY `borrowernumber` (`borrowernumber`),
598
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history  KEY `borrowernumber` (`borrowernumber`),
Lines 1457-1483 CREATE TABLE `borrowers` ( -- this table includes information about your patrons Link Here
1457
  `title` LONGTEXT, -- patron/borrower's title, for example: Mr. or Mrs.
1457
  `title` LONGTEXT, -- patron/borrower's title, for example: Mr. or Mrs.
1458
  `othernames` LONGTEXT, -- any other names associated with the patron/borrower
1458
  `othernames` LONGTEXT, -- any other names associated with the patron/borrower
1459
  `initials` MEDIUMTEXT, -- initials for your patron/borrower
1459
  `initials` MEDIUMTEXT, -- initials for your patron/borrower
1460
  `streetnumber` varchar(10) default NULL, -- the house number for your patron/borrower's primary address
1460
  `streetnumber` TINYTEXT default NULL, -- the house number for your patron/borrower's primary address
1461
  `streettype` varchar(50) default NULL, -- the street type (Rd., Blvd, etc) for your patron/borrower's primary address
1461
  `streettype` TINYTEXT default NULL, -- the street type (Rd., Blvd, etc) for your patron/borrower's primary address
1462
  `address` LONGTEXT, -- the first address line for your patron/borrower's primary address
1462
  `address` LONGTEXT, -- the first address line for your patron/borrower's primary address
1463
  `address2` MEDIUMTEXT, -- the second address line for your patron/borrower's primary address
1463
  `address2` MEDIUMTEXT, -- the second address line for your patron/borrower's primary address
1464
  `city` LONGTEXT, -- the city or town for your patron/borrower's primary address
1464
  `city` LONGTEXT, -- the city or town for your patron/borrower's primary address
1465
  `state` MEDIUMTEXT default NULL, -- the state or province for your patron/borrower's primary address
1465
  `state` MEDIUMTEXT default NULL, -- the state or province for your patron/borrower's primary address
1466
  `zipcode` varchar(25) default NULL, -- the zip or postal code for your patron/borrower's primary address
1466
  `zipcode` TINYTEXT default NULL, -- the zip or postal code for your patron/borrower's primary address
1467
  `country` MEDIUMTEXT, -- the country for your patron/borrower's primary address
1467
  `country` MEDIUMTEXT, -- the country for your patron/borrower's primary address
1468
  `email` LONGTEXT, -- the primary email address for your patron/borrower's primary address
1468
  `email` LONGTEXT, -- the primary email address for your patron/borrower's primary address
1469
  `phone` MEDIUMTEXT, -- the primary phone number for your patron/borrower's primary address
1469
  `phone` MEDIUMTEXT, -- the primary phone number for your patron/borrower's primary address
1470
  `mobile` varchar(50) default NULL, -- the other phone number for your patron/borrower's primary address
1470
  `mobile` TINYTEXT default NULL, -- the other phone number for your patron/borrower's primary address
1471
  `fax` LONGTEXT, -- the fax number for your patron/borrower's primary address
1471
  `fax` LONGTEXT, -- the fax number for your patron/borrower's primary address
1472
  `emailpro` MEDIUMTEXT, -- the secondary email addres for your patron/borrower's primary address
1472
  `emailpro` MEDIUMTEXT, -- the secondary email addres for your patron/borrower's primary address
1473
  `phonepro` MEDIUMTEXT, -- the secondary phone number for your patron/borrower's primary address
1473
  `phonepro` MEDIUMTEXT, -- the secondary phone number for your patron/borrower's primary address
1474
  `B_streetnumber` varchar(10) default NULL, -- the house number for your patron/borrower's alternate address
1474
  `B_streetnumber` TINYTEXT default NULL, -- the house number for your patron/borrower's alternate address
1475
  `B_streettype` varchar(50) default NULL, -- the street type (Rd., Blvd, etc) for your patron/borrower's alternate address
1475
  `B_streettype` TINYTEXT default NULL, -- the street type (Rd., Blvd, etc) for your patron/borrower's alternate address
1476
  `B_address` varchar(100) default NULL, -- the first address line for your patron/borrower's alternate address
1476
  `B_address` MEDIUMTEXT default NULL, -- the first address line for your patron/borrower's alternate address
1477
  `B_address2` MEDIUMTEXT default NULL, -- the second address line for your patron/borrower's alternate address
1477
  `B_address2` MEDIUMTEXT default NULL, -- the second address line for your patron/borrower's alternate address
1478
  `B_city` LONGTEXT, -- the city or town for your patron/borrower's alternate address
1478
  `B_city` LONGTEXT, -- the city or town for your patron/borrower's alternate address
1479
  `B_state` MEDIUMTEXT default NULL, -- the state for your patron/borrower's alternate address
1479
  `B_state` MEDIUMTEXT default NULL, -- the state for your patron/borrower's alternate address
1480
  `B_zipcode` varchar(25) default NULL, -- the zip or postal code for your patron/borrower's alternate address
1480
  `B_zipcode` TINYTEXT default NULL, -- the zip or postal code for your patron/borrower's alternate address
1481
  `B_country` MEDIUMTEXT, -- the country for your patron/borrower's alternate address
1481
  `B_country` MEDIUMTEXT, -- the country for your patron/borrower's alternate address
1482
  `B_email` MEDIUMTEXT, -- the patron/borrower's alternate email address
1482
  `B_email` MEDIUMTEXT, -- the patron/borrower's alternate email address
1483
  `B_phone` LONGTEXT, -- the patron/borrower's alternate phone number
1483
  `B_phone` LONGTEXT, -- the patron/borrower's alternate phone number
Lines 1504-1518 CREATE TABLE `borrowers` ( -- this table includes information about your patrons Link Here
1504
  `contactnote` varchar(255) default NULL, -- a note related to the patron/borrower's alternate address
1504
  `contactnote` varchar(255) default NULL, -- a note related to the patron/borrower's alternate address
1505
  `sort1` varchar(80) default NULL, -- a field that can be used for any information unique to the library
1505
  `sort1` varchar(80) default NULL, -- a field that can be used for any information unique to the library
1506
  `sort2` varchar(80) default NULL, -- a field that can be used for any information unique to the library
1506
  `sort2` varchar(80) default NULL, -- a field that can be used for any information unique to the library
1507
  `altcontactfirstname` varchar(255) default NULL, -- first name of alternate contact for the patron/borrower
1507
  `altcontactfirstname` MEDIUMTEXT  default NULL, -- first name of alternate contact for the patron/borrower
1508
  `altcontactsurname` varchar(255) default NULL, -- surname or last name of the alternate contact for the patron/borrower
1508
  `altcontactsurname` MEDIUMTEXT default NULL, -- surname or last name of the alternate contact for the patron/borrower
1509
  `altcontactaddress1` varchar(255) default NULL, -- the first address line for the alternate contact for the patron/borrower
1509
  `altcontactaddress1` MEDIUMTEXT default NULL, -- the first address line for the alternate contact for the patron/borrower
1510
  `altcontactaddress2` varchar(255) default NULL, -- the second address line for the alternate contact for the patron/borrower
1510
  `altcontactaddress2` MEDIUMTEXT default NULL, -- the second address line for the alternate contact for the patron/borrower
1511
  `altcontactaddress3` varchar(255) default NULL, -- the city for the alternate contact for the patron/borrower
1511
  `altcontactaddress3` MEDIUMTEXT default NULL, -- the city for the alternate contact for the patron/borrower
1512
  `altcontactstate` MEDIUMTEXT default NULL, -- the state for the alternate contact for the patron/borrower
1512
  `altcontactstate` MEDIUMTEXT default NULL, -- the state for the alternate contact for the patron/borrower
1513
  `altcontactzipcode` varchar(50) default NULL, -- the zipcode for the alternate contact for the patron/borrower
1513
  `altcontactzipcode` MEDIUMTEXT default NULL, -- the zipcode for the alternate contact for the patron/borrower
1514
  `altcontactcountry` MEDIUMTEXT default NULL, -- the country for the alternate contact for the patron/borrower
1514
  `altcontactcountry` MEDIUMTEXT default NULL, -- the country for the alternate contact for the patron/borrower
1515
  `altcontactphone` varchar(50) default NULL, -- the phone number for the alternate contact for the patron/borrower
1515
  `altcontactphone` MEDIUMTEXT default NULL, -- the phone number for the alternate contact for the patron/borrower
1516
  `smsalertnumber` varchar(50) default NULL, -- the mobile phone number where the patron/borrower would like to receive notices (if SMS turned on)
1516
  `smsalertnumber` varchar(50) default NULL, -- the mobile phone number where the patron/borrower would like to receive notices (if SMS turned on)
1517
  `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber
1517
  `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber
1518
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history
1518
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history
1519
- 

Return to bug 24986