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 2759-2764 CREATE TABLE `deleteditems` ( Link Here
2759
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
2759
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
2760
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out',
2760
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out',
2761
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
2761
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
2762
  `localuse` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been recorded as localuse',
2762
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
2763
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
2763
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
2764
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
2764
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
2765
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
Lines 4016-4021 CREATE TABLE `items` ( Link Here
4016
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
4017
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
4017
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out/issued',
4018
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out/issued',
4018
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
4019
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
4020
  `localuse` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been recorded as localuse',
4019
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
4021
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
4020
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
4022
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
4021
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
4023
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
4022
- 

Return to bug 16122