@@ -, +, @@ --- installer/data/mysql/atomicupdate/bug_17845.perl | 13 +++++++++++++ .../mysql/atomicupdate/bug_17845_remove_printers | 4 ---- 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_17845.perl delete mode 100644 installer/data/mysql/atomicupdate/bug_17845_remove_printers --- a/installer/data/mysql/atomicupdate/bug_17845.perl +++ a/installer/data/mysql/atomicupdate/bug_17845.perl @@ -0,0 +1,13 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( "DROP TABLE IF EXISTS printers" ); + + if( !column_exists( 'branches', 'branchprinter' ) ) { + $dbh->do( "ALTER TABLE branches DROP COLUMN branchprinter" ); + } + + $dbh->do(qq{ DELETE FROM systempreferences WHERE variable = "printcirculationslips"} ); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 17845 - Drop unused table printers and branchprinter column)\n"; +} --- a/installer/data/mysql/atomicupdate/bug_17845_remove_printers +++ a/installer/data/mysql/atomicupdate/bug_17845_remove_printers @@ -1,4 +0,0 @@ -DROP TABLE IF EXISTS printers; -ALTER TABLE branches DROP COLUMN branchprinter; -DELETE FROM systempreferences WHERE variable = "printcirculationslips"; --- Bug 17845: Drop unused table printers and branchprinter column --