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 1281-1286 CREATE TABLE `borrower_modifications` ( Link Here
1281
  `title` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1281
  `title` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1282
  `othernames` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1282
  `othernames` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1283
  `initials` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1283
  `initials` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1284
  `pronouns` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1284
  `streetnumber` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1285
  `streetnumber` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1285
  `streettype` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1286
  `streettype` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1286
  `address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1287
  `address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
Lines 1400-1405 CREATE TABLE `borrowers` ( Link Here
1400
  `title` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s title, for example: Mr. or Mrs.',
1401
  `title` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s title, for example: Mr. or Mrs.',
1401
  `othernames` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any other names associated with the patron/borrower',
1402
  `othernames` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any other names associated with the patron/borrower',
1402
  `initials` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'initials for your patron/borrower',
1403
  `initials` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'initials for your patron/borrower',
1404
  `pronouns` longtext COLLATE utfmb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower pronouns',
1403
  `streetnumber` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the house number for your patron/borrower''s primary address',
1405
  `streetnumber` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the house number 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',
1406
  `streettype` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the street type (Rd., Blvd, etc) 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',
1407
  `address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the first address line for your patron/borrower''s primary address',
Lines 2544-2549 CREATE TABLE `deletedborrowers` ( Link Here
2544
  `title` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s title, for example: Mr. or Mrs.',
2546
  `title` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s title, for example: Mr. or Mrs.',
2545
  `othernames` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any other names associated with the patron/borrower',
2547
  `othernames` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any other names associated with the patron/borrower',
2546
  `initials` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'initials for your patron/borrower',
2548
  `initials` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'initials for your patron/borrower',
2549
  `pronouns` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower pronouns',
2547
  `streetnumber` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the house number for your patron/borrower''s primary address',
2550
  `streetnumber` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the house number for your patron/borrower''s primary address',
2548
  `streettype` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the street type (Rd., Blvd, etc) for your patron/borrower''s primary address',
2551
  `streettype` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the street type (Rd., Blvd, etc) for your patron/borrower''s primary address',
2549
  `address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the first address line for your patron/borrower''s primary address',
2552
  `address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the first address line for your patron/borrower''s primary address',
2550
- 

Return to bug 10950