View | Details | Raw Unified | Return to bug 24131
Collapse All | Expand All

(-)a/installer/data/mysql/updatedatabase.pl (-24 / +17 lines)
Lines 20885-20892 if( CheckVersion( $DBversion ) ) { Link Here
20885
        $dbh->do('ALTER TABLE account_credit_types ADD COLUMN archived tinyint(1) NOT NULL DEFAULT 0 AFTER is_system');
20885
        $dbh->do('ALTER TABLE account_credit_types ADD COLUMN archived tinyint(1) NOT NULL DEFAULT 0 AFTER is_system');
20886
    }
20886
    }
20887
20887
20888
    SetVersion( $DBversion );
20888
    NewVersion( $DBversion, 17702, 'Add column account_credit_types.archived');
20889
    print "Upgrade to $DBversion done (Bug 17702 - Add column account_credit_types.archived)\n";
20890
}
20889
}
20891
20890
20892
$DBversion = '19.12.00.030';
20891
$DBversion = '19.12.00.030';
Lines 20907-20923 if( CheckVersion( $DBversion ) ) { Link Here
20907
    my ($opacheader) = $dbh->selectrow_array( q|
20906
    my ($opacheader) = $dbh->selectrow_array( q|
20908
        SELECT value FROM systempreferences WHERE variable='opacheader';
20907
        SELECT value FROM systempreferences WHERE variable='opacheader';
20909
    |);
20908
    |);
20909
20910
    my @detail;
20910
    if( $opacheader ){
20911
    if( $opacheader ){
20911
        foreach my $lang ( @langs ) {
20912
        foreach my $lang ( @langs ) {
20912
            print "Inserting opacheader contents into $lang news item...\n";
20913
            # If there is a value in the opacheader preference, insert it into opac_news
20913
            # If there is a value in the opacheader preference, insert it into opac_news
20914
            $dbh->do("INSERT INTO opac_news (branchcode, lang, title, content ) VALUES (NULL, ?, '', ?)", undef, "opacheader_$langs[0]", $opacheader);
20914
            $dbh->do("INSERT INTO opac_news (branchcode, lang, title, content ) VALUES (NULL, ?, '', ?)", undef, "opacheader_$langs[0]", $opacheader);
20915
            push @detail, "Inserted opacheader contents into $lang news item...\n";
20915
        }
20916
        }
20916
    }
20917
    }
20917
    # Remove the opacheader system preference
20918
    # Remove the opacheader system preference
20918
    $dbh->do("DELETE FROM systempreferences WHERE variable='opacheader'");
20919
    $dbh->do("DELETE FROM systempreferences WHERE variable='opacheader'");
20919
    SetVersion ($DBversion);
20920
20920
    print "Upgrade to $DBversion done (Bug 22880: Move contents of opacheader preference to Koha news system)\n";
20921
    unshift @detail, 'Move contents of opacheader preference to Koha news system';
20922
    NewVersion( $DBversion, 22880, \@detail);
20921
}
20923
}
20922
20924
20923
$DBversion = '19.12.00.031';
20925
$DBversion = '19.12.00.031';
Lines 20925-20932 if( CheckVersion( $DBversion ) ) { Link Here
20925
    $dbh->do( q|
20927
    $dbh->do( q|
20926
ALTER TABLE article_requests MODIFY COLUMN created_on timestamp NULL, MODIFY COLUMN updated_on timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
20928
ALTER TABLE article_requests MODIFY COLUMN created_on timestamp NULL, MODIFY COLUMN updated_on timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
20927
    |);
20929
    |);
20928
    SetVersion( $DBversion );
20930
20929
    print "Upgrade to $DBversion done (Bug 22273: Column article_requests.created_on should not be updated)\n";
20931
    NewVersion( $DBversion, 22273, "Column article_requests.created_on should not be updated" );
20930
}
20932
}
20931
20933
20932
$DBversion = '19.12.00.032';
20934
$DBversion = '19.12.00.032';
Lines 20935-20942 if( CheckVersion( $DBversion ) ) { Link Here
20935
        DELETE FROM systempreferences WHERE variable="UseQueryParser"
20937
        DELETE FROM systempreferences WHERE variable="UseQueryParser"
20936
    |);
20938
    |);
20937
20939
20938
    SetVersion( $DBversion );
20940
    NewVersion( $DBversion, 24735, "Remove UseQueryParser system preference" );
20939
    print "Upgrade to $DBversion done (Bug 24735 - Remove UseQueryParser system preference)\n";
20940
}
20941
}
20941
20942
20942
$DBversion = '19.12.00.033';
20943
$DBversion = '19.12.00.033';
Lines 20964-20972 if ( CheckVersion($DBversion) ) { Link Here
20964
        (25, 'cashup', 'Perform cash register cashup action')
20965
        (25, 'cashup', 'Perform cash register cashup action')
20965
    });
20966
    });
20966
20967
20967
    SetVersion($DBversion);
20968
    NewVersion( $DBversion, 23355, [ "Add cash_register_actions table", "Add cash register cashup permissions" ] );
20968
    print "Upgrade to $DBversion done (Bug 23355 - Add cash_register_actions table)\n";
20969
    print "Upgrade to $DBversion done (Bug 23355 - Add cash register cashup permissions)\n";
20970
}
20969
}
20971
20970
20972
$DBversion = '19.12.00.034';
20971
$DBversion = '19.12.00.034';
Lines 20994-21001 if ( CheckVersion($DBversion) ) { Link Here
20994
    }
20993
    }
20995
    );
20994
    );
20996
20995
20997
    SetVersion($DBversion);
20996
    NewVersion( $DBversion, 24081, "Add DISCOUNT to account_credit_types and account_offset_types, Add accounts discount permission");
20998
    print "Upgrade to $DBversion done (Bug 24081 - Add DISCOUNT to account_credit_types and account_offset_types, Add accounts discount permission)\n";
20999
}
20997
}
21000
20998
21001
$DBversion = '19.12.00.035';
20999
$DBversion = '19.12.00.035';
Lines 21007-21014 if ( CheckVersion($DBversion) ) { Link Here
21007
        (25, 'anonymous_refund', 'Perform refund actions from cash registers')
21005
        (25, 'anonymous_refund', 'Perform refund actions from cash registers')
21008
    });
21006
    });
21009
21007
21010
    SetVersion($DBversion);
21008
    NewVersion( $DBversion, 23442, "Add a refund option to the point of sale system" );
21011
    print "Upgrade to $DBversion done (Bug 23442 - Add a refund option to the point of sale system)\n";
21012
}
21009
}
21013
21010
21014
$DBversion = '19.12.00.036';
21011
$DBversion = '19.12.00.036';
Lines 21020-21027 if( CheckVersion( $DBversion ) ) { Link Here
21020
            ('AccessControlAllowOrigin', '', NULL, 'Set the Access-Control-Allow-Origin header to the specified value', 'Free');
21017
            ('AccessControlAllowOrigin', '', NULL, 'Set the Access-Control-Allow-Origin header to the specified value', 'Free');
21021
    });
21018
    });
21022
21019
21023
    SetVersion( $DBversion );
21020
    NewVersion( $DBversion, 24369, "Add CORS support to Koha");
21024
    print "Upgrade to $DBversion done (Bug 24369 - Add CORS support to Koha)\n";
21025
}
21021
}
21026
21022
21027
$DBversion = '19.12.00.037';
21023
$DBversion = '19.12.00.037';
Lines 21031-21046 if( CheckVersion( $DBversion ) ) { Link Here
21031
    
21027
    
21032
    $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('RenewAccruingItemWhenPaid', '0', 'If enabled, when the fines on an item accruing is paid off, attempt to renew that item. If the syspref "RenewalPeriodBase" is set to "due date", renewed items may still be overdue', '', 'YesNo'); | );
21028
    $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('RenewAccruingItemWhenPaid', '0', 'If enabled, when the fines on an item accruing is paid off, attempt to renew that item. If the syspref "RenewalPeriodBase" is set to "due date", renewed items may still be overdue', '', 'YesNo'); | );
21033
21029
21034
    SetVersion( $DBversion );
21030
    NewVersion( $DBversion, 23051, [ "Add RenewAccruingItemInOpac syspref", "Add RenewAccruingItemWhenPaid syspref" ]);
21035
    print "Upgrade to $DBversion done (Bug 23051 - Add RenewAccruingItemInOpac syspref)\n";
21036
    print "Upgrade to $DBversion done (Bug 23051 - Add RenewAccruingItemWhenPaid syspref)\n";
21037
}
21031
}
21038
21032
21039
$DBversion = '19.12.00.038';
21033
$DBversion = '19.12.00.038';
21040
if( CheckVersion( $DBversion ) ) {
21034
if( CheckVersion( $DBversion ) ) {
21041
    $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CirculateILL', '0', 'If enabled, it is possible to circulate ILL requested items from within ILL', '', 'YesNo'); | );
21035
    $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CirculateILL', '0', 'If enabled, it is possible to circulate ILL requested items from within ILL', '', 'YesNo'); | );
21042
    SetVersion( $DBversion );
21036
21043
    print "Upgrade to $DBversion done (Bug 23112  - Add CirculateILL syspref)\n";
21037
    NewVersion( $DBversion, 23112, "Add CirculateILL syspref");
21044
}
21038
}
21045
21039
21046
$DBversion = '19.12.00.039';
21040
$DBversion = '19.12.00.039';
21047
- 

Return to bug 24131