Bug 17845: Remove the column if it exists
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
07b0c5bc0e
commit
b0a783a8a8
1 changed files with 2 additions and 2 deletions
|
@ -2,8 +2,8 @@ $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" );
|
||||
if( column_exists( 'branches', 'branchprinter' ) ) {
|
||||
$dbh->do( "ALTER TABLE branches DROP COLUMN branchprinter" );
|
||||
}
|
||||
|
||||
$dbh->do(qq{ DELETE FROM systempreferences WHERE variable = "printcirculationslips"} );
|
||||
|
|
Loading…
Reference in a new issue