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

(-)a/installer/data/mysql/atomicupdate/bug_16122_atomicupdate.pl (+27 lines)
Line 0 Link Here
1
use Modern::Perl;
2
return {
3
    bug_number => "16122",
4
    description => "Add localuser column to items table",
5
    up => sub {
6
        my ($args) = @_;
7
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        if( !column_exists( 'items', 'localuse' ) ) {
9
            $dbh->do(q{
10
                ALTER TABLE items
11
                ADD COLUMN localuse smallint(6) NULL DEFAULT NULL
12
                COMMENT "item's local use count"
13
                AFTER renewals
14
            });
15
            say $out "Added column 'items.localuse'";
16
        }
17
        if( !column_exists( 'deleteditems', 'localuse' ) ) {
18
            $dbh->do(q{
19
                ALTER TABLE deleteditems
20
                ADD COLUMN localuse smallint(6) NULL DEFAULT NULL
21
                COMMENT "deleteditems local use count"
22
                AFTER renewals
23
            });
24
            say $out "Added column 'deleteditems.localuse'";
25
        }
26
    },
27
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +2 lines)
Lines 2688-2693 CREATE TABLE `deleteditems` ( Link Here
2688
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
2688
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
2689
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out',
2689
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out',
2690
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
2690
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
2691
  `localuse` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been recorded as localuse',
2691
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
2692
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
2692
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
2693
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
2693
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
2694
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
Lines 3660-3665 CREATE TABLE `items` ( Link Here
3660
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
3661
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
3661
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out/issued',
3662
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out/issued',
3662
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
3663
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
3664
  `localuse` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been recorded as localuse',
3663
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
3665
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
3664
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
3666
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
3665
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
3667
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
3666
- 

Return to bug 16122