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 2640-2645 CREATE TABLE `deleteditems` ( Link Here
2640
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
2640
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
2641
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out',
2641
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out',
2642
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
2642
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
2643
  `localuse` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been recorded as localuse',
2643
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
2644
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
2644
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
2645
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
2645
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
2646
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
Lines 3609-3614 CREATE TABLE `items` ( Link Here
3609
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
3610
  `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
3610
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out/issued',
3611
  `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out/issued',
3611
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
3612
  `renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
3613
  `localuse` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been recorded as localuse',
3612
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
3614
  `reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
3613
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
3615
  `restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
3614
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
3616
  `itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
3615
- 

Return to bug 16122