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

(-)a/installer/data/mysql/atomicupdate/Bug-7021-Reintroduce_usercode_column.perl (-10 lines)
Lines 1-10 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    # you can use $dbh here like:
4
    # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" );
5
6
    $dbh->do("ALTER TABLE statistics ADD COLUMN categorycode varchar(10) AFTER ccode");
7
8
    # Always end with this (adjust the bug info)
9
    NewVersion( $DBversion, 7021, "Bug 7021 - Introduce categorycode column");
10
}
(-)a/installer/data/mysql/atomicupdate/bug_7201.pl (-1 / +16 lines)
Line 0 Link Here
0
- 
1
use Modern::Perl;
2
3
return {
4
    bug_number => "7021",
5
    description => "Add patron category to the statistics table",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        if( !column_exists( 'statistics', 'categorycode' ) ) {
11
            $dbh->do(
12
                "ALTER TABLE statistics ADD COLUMN categorycode varchar(10) AFTER ccode"
13
            );
14
        }
15
    },
16
};

Return to bug 7021