@@ -, +, @@ --- .../data/mysql/atomicupdate/bug_28633.perl | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_28633.perl --- a/installer/data/mysql/atomicupdate/bug_28633.perl +++ a/installer/data/mysql/atomicupdate/bug_28633.perl @@ -0,0 +1,28 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + if( !column_exists( 'borrowers', 'preferredname' ) ) { + $dbh->do(q{ + ALTER TABLE borrowers + ADD COLUMN preferredname longtext NULL DEFAULT NULL + COMMENT "patron/borrower's preferred name" + AFTER firstname + }); + } + if( !column_exists( 'deletedborrowers', 'preferredname' ) ) { + $dbh->do(q{ + ALTER TABLE deletedborrowers + ADD COLUMN preferredname longtext NULL DEFAULT NULL + COMMENT "patron/borrower's preferred name" + AFTER firstname + }); + } + if( !column_exists( 'borrower_modifications', 'preferredname' ) ) { + $dbh->do(q{ + ALTER TABLE borrower_modifications + ADD COLUMN preferredname longtext NULL DEFAULT NULL + COMMENT "patron/borrower's preferred name" + AFTER firstname + }); + } + NewVersion( $DBversion, 28633, "Add preferredname to borrowers tables"); +} --