From 97240b2bb46a47857943aa5cb70f29b83eb9e144 Mon Sep 17 00:00:00 2001 From: =?utf8?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 Signed-off-by: Emmi Takkinen Signed-off-by: Nick Clemens JD Amended patch: Add a "SKIP" note on the DBrev we commented out Signed-off-by: Jonathan Druart --- 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 50c5df0fee..aa013fb101 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -24229,25 +24229,29 @@ 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 - }); - } + # This DB upgrade has been commented out because it removes + # actively used data, the relationship columns will be added back - if ( column_exists( 'borrower_modifications', 'relationship' ) ) { - $dbh->do(q{ - ALTER TABLE borrower_modifications DROP COLUMN relationship - }); - } + # 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"); + NewVersion( $DBversion, 26995, "[SKIP] Drop column relationship from borrower tables [not executed]"); } $DBversion = '20.12.00.049'; -- 2.39.5