Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
--- /dev/null
+$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";
+}
+++ /dev/null
-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