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 2756-2761 CREATE TABLE `deleteditems` ( Link Here
2756
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
2756
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
2757
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out',
2757
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out',
2758
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
2758
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
2759
  `localuse` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been recorded as localuse',
2759
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
2760
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
2760
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
2761
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
2761
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
2762
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
Lines 3983-3988 CREATE TABLE `items` ( Link Here
3983
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
3984
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
3984
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out/issued',
3985
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out/issued',
3985
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
3986
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
3987
  `localuse` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been recorded as localuse',
3986
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
3988
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
3987
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
3989
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
3988
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
3990
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
3989
- 

Return to bug 16122