From ddfc3fca690ccc4a041089d5813558e79c93f359 Mon Sep 17 00:00:00 2001 From: Joy Nelson Date: Fri, 7 Feb 2020 23:59:33 +0000 Subject: [PATCH] Bug 24289: dbrev update to remove atomicupdate file --- .../data/mysql/atomicupdate/bug_24289.perl | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_24289.perl diff --git a/installer/data/mysql/atomicupdate/bug_24289.perl b/installer/data/mysql/atomicupdate/bug_24289.perl deleted file mode 100644 index 231e1ab88b..0000000000 --- a/installer/data/mysql/atomicupdate/bug_24289.perl +++ /dev/null @@ -1,31 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - if( !foreign_key_exists( 'repeatable_holidays', 'repeatable_holidays_ibfk_1' ) ) { - $dbh->do(q| - DELETE h - FROM repeatable_holidays h - LEFT JOIN branches b ON h.branchcode=b.branchcode - WHERE b.branchcode IS NULL; - |); - $dbh->do(q| - ALTER TABLE repeatable_holidays - ADD FOREIGN KEY repeatable_holidays_ibfk_1 (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE - |); - } - - if( !foreign_key_exists( 'special_holidays', 'special_holidays_ibfk_1' ) ) { - $dbh->do(q| - DELETE h - FROM special_holidays h - LEFT JOIN branches b ON h.branchcode=b.branchcode - WHERE b.branchcode IS NULL; - |); - $dbh->do(q| - ALTER TABLE special_holidays - ADD FOREIGN KEY special_holidays_ibfk_1 (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE - |); - } - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 24289 - Adding foreign keys on *_holidays.branchcode tables)\n"; -} -- 2.39.2