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

(-)a/installer/data/mysql/atomicupdate/bug_10950.pl (+36 lines)
Line 0 Link Here
1
use Modern::Perl;
2
return {
3
    bug_number => "10950",
4
    description => "Add pronouns to borrowers table",
5
    up => sub {
6
        my ($args) = @_;
7
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        if( !column_exists( 'borrowers', 'pronouns' ) ) {
9
            $dbh->do(q{
10
                ALTER TABLE borrowers
11
                ADD COLUMN pronouns longtext NULL DEFAULT NULL
12
                COMMENT "patron/borrower's pronouns"
13
                AFTER initials
14
            });
15
            say $out "Added pronouns column to borrowers table";
16
        }
17
        if( !column_exists( 'deletedborrowers', 'pronouns' ) ) {
18
            $dbh->do(q{
19
                ALTER TABLE deletedborrowers
20
                ADD COLUMN pronouns longtext NULL DEFAULT NULL
21
                COMMENT "patron/borrower's pronouns"
22
                AFTER initials
23
            });
24
            say $out "Added pronouns column to deletedborrowers table";
25
        }
26
        if( !column_exists( 'borrower_modifications', 'pronouns' ) ) {
27
            $dbh->do(q{
28
                ALTER TABLE borrower_modifications
29
                ADD COLUMN pronouns longtext NULL DEFAULT NULL
30
                COMMENT "patron/borrower's pronouns"
31
                AFTER initials
32
            });
33
            say $out "Added pronouns column to borrower_modifications table";
34
        }
35
    },
36
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +3 lines)
Lines 1279-1284 CREATE TABLE `borrower_modifications` ( Link Here
1279
  `title` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1279
  `title` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1280
  `othernames` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1280
  `othernames` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1281
  `initials` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1281
  `initials` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1282
  `pronouns` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1282
  `streetnumber` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1283
  `streetnumber` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1283
  `streettype` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1284
  `streettype` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1284
  `address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1285
  `address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
Lines 1398-1403 CREATE TABLE `borrowers` ( Link Here
1398
  `title` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s title, for example: Mr. or Mrs.',
1399
  `title` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s title, for example: Mr. or Mrs.',
1399
  `othernames` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any other names associated with the patron/borrower',
1400
  `othernames` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any other names associated with the patron/borrower',
1400
  `initials` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'initials for your patron/borrower',
1401
  `initials` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'initials for your patron/borrower',
1402
  `pronouns` longtext COLLATE utfmb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower pronouns',
1401
  `streetnumber` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the house number for your patron/borrower''s primary address',
1403
  `streetnumber` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the house number for your patron/borrower''s primary address',
1402
  `streettype` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the street type (Rd., Blvd, etc) for your patron/borrower''s primary address',
1404
  `streettype` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the street type (Rd., Blvd, etc) for your patron/borrower''s primary address',
1403
  `address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the first address line for your patron/borrower''s primary address',
1405
  `address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the first address line for your patron/borrower''s primary address',
Lines 2534-2539 CREATE TABLE `deletedborrowers` ( Link Here
2534
  `title` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s title, for example: Mr. or Mrs.',
2536
  `title` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s title, for example: Mr. or Mrs.',
2535
  `othernames` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any other names associated with the patron/borrower',
2537
  `othernames` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any other names associated with the patron/borrower',
2536
  `initials` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'initials for your patron/borrower',
2538
  `initials` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'initials for your patron/borrower',
2539
  `pronouns` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower pronouns',
2537
  `streetnumber` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the house number for your patron/borrower''s primary address',
2540
  `streetnumber` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the house number for your patron/borrower''s primary address',
2538
  `streettype` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the street type (Rd., Blvd, etc) for your patron/borrower''s primary address',
2541
  `streettype` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the street type (Rd., Blvd, etc) for your patron/borrower''s primary address',
2539
  `address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the first address line for your patron/borrower''s primary address',
2542
  `address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the first address line for your patron/borrower''s primary address',
2540
- 

Return to bug 10950