Bug 10950: Database update
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
2084810e56
commit
e2f7db2c2b
|
|
@ -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";
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in New Issue