From 229c8972e50c550dcfb927d3b9734899fbf4d7f5 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 21 Jul 2021 10:42:35 +0000 Subject: [PATCH] Bug 28633: DB Update --- .../data/mysql/atomicupdate/bug_28633.perl | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_28633.perl diff --git a/installer/data/mysql/atomicupdate/bug_28633.perl b/installer/data/mysql/atomicupdate/bug_28633.perl new file mode 100644 index 0000000000..aaabcd10d9 --- /dev/null +++ b/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"); +} -- 2.20.1