From e4750f6179bab34c2fe76418e89a4e29bdb83088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= Date: Wed, 2 Jun 2021 20:22:51 +0300 Subject: [PATCH] Bug 28490: Comment out the relationship data removing DB update step These columns that were actively used to store non-patron guarantor relationship info were dropped incorrectly. In a later patch the relationship fields will be re-added. Signed-off-by: Kyle M Hall Signed-off-by: Petro Vashchuk --- installer/data/mysql/updatedatabase.pl | 36 ++++++++++++++------------ 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index bf3f5c72db..44f30f93c7 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -24229,23 +24229,27 @@ if( CheckVersion( $DBversion ) ) { $DBversion = '20.12.00.048'; if( CheckVersion( $DBversion ) ) { - if ( column_exists( 'borrowers', 'relationship' ) ) { - $dbh->do(q{ - ALTER TABLE borrowers DROP COLUMN relationship - }); - } - - if ( column_exists( 'deletedborrowers', 'relationship' ) ) { - $dbh->do(q{ - ALTER TABLE deletedborrowers DROP COLUMN relationship - }); - } - if ( column_exists( 'borrower_modifications', 'relationship' ) ) { - $dbh->do(q{ - ALTER TABLE borrower_modifications DROP COLUMN relationship - }); - } + # This DB upgrade has been commented out because it removes + # actively used data, the relationship columns will be added back + + # if ( column_exists( 'borrowers', 'relationship' ) ) { + # $dbh->do(q{ + # ALTER TABLE borrowers DROP COLUMN relationship + # }); + # } + + # if ( column_exists( 'deletedborrowers', 'relationship' ) ) { + # $dbh->do(q{ + # ALTER TABLE deletedborrowers DROP COLUMN relationship + # }); + # } + + # if ( column_exists( 'borrower_modifications', 'relationship' ) ) { + # $dbh->do(q{ + # ALTER TABLE borrower_modifications DROP COLUMN relationship + # }); + # } NewVersion( $DBversion, 26995, "Drop column relationship from borrower tables"); } -- 2.31.1