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

(-)a/installer/data/mysql/atomicupdate/bug_24338.perl (-7 / +10 lines)
Lines 1-11 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(qq{
3
    my $exists;
4
        INSERT INTO
4
    eval { $exists = $dbh->do("SELECT 1 FROM authorised_values WHERE category = 'PAYMENT_TYPE' AND authorised_value = 'CASH'"); };
5
          authorised_values (category,authorised_value,lib, lib_opac)
5
    if ( $exists == 0 ) {
6
        VALUES
6
        $dbh->do(qq{
7
          ('PAYMENT_TYPE','CASH','Cash','Cash')
7
            INSERT INTO
8
    });
8
              authorised_values (category,authorised_value,lib, lib_opac)
9
            VALUES
10
              ('PAYMENT_TYPE','CASH','Cash','Cash')
11
        });
12
    }
9
13
10
    SetVersion( $DBversion );
14
    SetVersion( $DBversion );
11
    print "Upgrade to $DBversion done (Bug 24338 - Add 'CASH' to default 'PAYMENT_TYPE')\n";
15
    print "Upgrade to $DBversion done (Bug 24338 - Add 'CASH' to default 'PAYMENT_TYPE')\n";
12
- 

Return to bug 24338