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

(-)a/installer/data/mysql/atomicupdate/bug_22610.perl (-1 / +45 lines)
Line 0 Link Here
0
- 
1
$DBversion = 'XXX';    # will be replaced by the RM
2
if ( CheckVersion($DBversion) ) {
3
4
    $dbh->do(qq{
5
        INSERT INTO
6
          authorised_values (category,authorised_value,lib)
7
        VALUES
8
          ('PAYMENT_TYPE','SIP00','Cash via SIP2'),
9
          ('PAYMENT_TYPE','SIP01','VISA via SIP2'),
10
          ('PAYMENT_TYPE','SIP02','Creditcard via SIP2')
11
    });
12
13
    $dbh->do(qq{
14
        UPDATE
15
          accountlines
16
        SET
17
          accounttype  = 'Pay',
18
          payment_type = 'SIP00'
19
        WHERE
20
          accounttype = 'Pay00';
21
    });
22
23
    $dbh->do(qq{
24
        UPDATE
25
          accountlines
26
        SET
27
          accounttype  = 'Pay',
28
          payment_type = 'SIP01'
29
        WHERE
30
          accounttype = 'Pay01';
31
    });
32
33
    $dbh->do(qq{
34
        UPDATE
35
          accountlines
36
        SET
37
          accounttype  = 'Pay',
38
          payment_type = 'SIP02'
39
        WHERE
40
          accounttype = 'Pay02';
41
    });
42
43
    SetVersion($DBversion);
44
    print "Upgrade to $DBversion done (Bug 22610 - Fix accounttypes for SIP2 payments)\n";
45
}

Return to bug 22610