@@ -, +, @@ --- .../data/mysql/atomicupdate/bug_10950.pl | 36 +++++++++++++++++++ installer/data/mysql/kohastructure.sql | 3 ++ 2 files changed, 39 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_10950.pl --- a/installer/data/mysql/atomicupdate/bug_10950.pl +++ a/installer/data/mysql/atomicupdate/bug_10950.pl @@ -0,0 +1,36 @@ +use Modern::Perl; +return { + bug_number => "10950", + description => "Add pronouns to borrowers table", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + if( !column_exists( 'borrowers', 'pronouns' ) ) { + $dbh->do(q{ + ALTER TABLE borrowers + ADD COLUMN pronouns longtext NULL DEFAULT NULL + COMMENT "patron/borrower's pronouns" + AFTER initials + }); + say $out "Added pronouns column to borrowers table"; + } + if( !column_exists( 'deletedborrowers', 'pronouns' ) ) { + $dbh->do(q{ + ALTER TABLE deletedborrowers + ADD COLUMN pronouns longtext NULL DEFAULT NULL + COMMENT "patron/borrower's pronouns" + AFTER initials + }); + say $out "Added pronouns column to deletedborrowers table"; + } + if( !column_exists( 'borrower_modifications', 'pronouns' ) ) { + $dbh->do(q{ + ALTER TABLE borrower_modifications + ADD COLUMN pronouns longtext NULL DEFAULT NULL + COMMENT "patron/borrower's pronouns" + AFTER initials + }); + say $out "Added pronouns column to borrower_modifications table"; + } + }, +} --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -1281,6 +1281,7 @@ CREATE TABLE `borrower_modifications` ( `title` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, `othernames` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, `initials` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `pronouns` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, `streetnumber` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `streettype` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, @@ -1400,6 +1401,7 @@ CREATE TABLE `borrowers` ( `title` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s title, for example: Mr. or Mrs.', `othernames` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any other names associated with the patron/borrower', `initials` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'initials for your patron/borrower', + `pronouns` longtext COLLATE utfmb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower pronouns', `streetnumber` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the house number for your patron/borrower''s primary address', `streettype` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the street type (Rd., Blvd, etc) for your patron/borrower''s primary address', `address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the first address line for your patron/borrower''s primary address', @@ -2544,6 +2546,7 @@ CREATE TABLE `deletedborrowers` ( `title` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s title, for example: Mr. or Mrs.', `othernames` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any other names associated with the patron/borrower', `initials` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'initials for your patron/borrower', + `pronouns` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower pronouns', `streetnumber` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the house number for your patron/borrower''s primary address', `streettype` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the street type (Rd., Blvd, etc) for your patron/borrower''s primary address', `address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the first address line for your patron/borrower''s primary address', --