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

(-)a/installer/data/mysql/atomicupdate/bug_9834.perl (+12 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    unless ( column_exists( 'reserves', 'item_level_hold' ) ) {
4
        $dbh->do( "ALTER TABLE reserves ADD COLUMN item_level_hold BOOLEAN NOT NULL DEFAULT 0 AFTER itemtype" );
5
    }
6
    unless ( column_exists( 'old_reserves', 'item_level_hold' ) ) {
7
        $dbh->do( "ALTER TABLE old_reserves ADD COLUMN item_level_hold BOOLEAN NOT NULL DEFAULT 0 AFTER itemtype" );
8
    }
9
10
    SetVersion( $DBversion );
11
    print "Upgrade to $DBversion done (Bug 9834 - Add the reserves.item_level_hold column)\n";
12
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +2 lines)
Lines 1882-1887 CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha Link Here
1882
  `suspend` BOOLEAN NOT NULL DEFAULT 0,
1882
  `suspend` BOOLEAN NOT NULL DEFAULT 0,
1883
  `suspend_until` DATETIME NULL DEFAULT NULL,
1883
  `suspend_until` DATETIME NULL DEFAULT NULL,
1884
  `itemtype` VARCHAR(10) NULL DEFAULT NULL, -- If record level hold, the optional itemtype of the item the patron is requesting
1884
  `itemtype` VARCHAR(10) NULL DEFAULT NULL, -- If record level hold, the optional itemtype of the item the patron is requesting
1885
  `item_level_hold` BOOLEAN NOT NULL DEFAULT 0, -- Is the hpld placed at item level
1885
  PRIMARY KEY (`reserve_id`),
1886
  PRIMARY KEY (`reserve_id`),
1886
  KEY priorityfoundidx (priority,found),
1887
  KEY priorityfoundidx (priority,found),
1887
  KEY `borrowernumber` (`borrowernumber`),
1888
  KEY `borrowernumber` (`borrowernumber`),
Lines 1921-1926 CREATE TABLE `old_reserves` ( -- this table holds all holds/reserves that have b Link Here
1921
  `suspend` BOOLEAN NOT NULL DEFAULT 0, -- in this hold suspended (1 for yes, 0 for no)
1922
  `suspend` BOOLEAN NOT NULL DEFAULT 0, -- in this hold suspended (1 for yes, 0 for no)
1922
  `suspend_until` DATETIME NULL DEFAULT NULL, -- the date this hold is suspended until (NULL for infinitely)
1923
  `suspend_until` DATETIME NULL DEFAULT NULL, -- the date this hold is suspended until (NULL for infinitely)
1923
  `itemtype` VARCHAR(10) NULL DEFAULT NULL, -- If record level hold, the optional itemtype of the item the patron is requesting
1924
  `itemtype` VARCHAR(10) NULL DEFAULT NULL, -- If record level hold, the optional itemtype of the item the patron is requesting
1925
  `item_level_hold` BOOLEAN NOT NULL DEFAULT 0, -- Is the hpld placed at item level
1924
  PRIMARY KEY (`reserve_id`),
1926
  PRIMARY KEY (`reserve_id`),
1925
  KEY `old_reserves_borrowernumber` (`borrowernumber`),
1927
  KEY `old_reserves_borrowernumber` (`borrowernumber`),
1926
  KEY `old_reserves_biblionumber` (`biblionumber`),
1928
  KEY `old_reserves_biblionumber` (`biblionumber`),
1927
- 

Return to bug 9834