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

(-)a/installer/data/mysql/atomicupdate/bug-19889.perl (+22 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    if( !column_exists( 'items', 'exclude_from_local_holds_priority' ) ) {
4
        $dbh->do(q{
5
            ALTER TABLE `items` ADD COLUMN `exclude_from_local_holds_priority` tinyint(1) default NULL AFTER `new_status` -- Exclude this item from local holds priority
6
        });
7
    }
8
9
    if( !column_exists( 'deleteditems', 'exclude_from_local_holds_priority' ) ) {
10
        $dbh->do(q{
11
            ALTER TABLE `deleteditems` ADD COLUMN `exclude_from_local_holds_priority` tinyint(1) default NULL AFTER `new_status` -- Exclude this item from local holds priority
12
        });
13
    }
14
15
    if( !column_exists( 'categories', 'exclude_from_local_holds_priority' ) ) {
16
        $dbh->do(q{
17
            ALTER TABLE `categories` ADD COLUMN `exclude_from_local_holds_priority` tinyint(1) default NULL AFTER `change_password` -- Exclude patrons of this category from local holds priority
18
        });
19
    }
20
    # Always end with this (adjust the bug info)
21
    NewVersion( $DBversion, 19889, "Add exclude_from_local_holds_priority column to items, deleteditems and categories tables");
22
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +3 lines)
Lines 327-332 CREATE TABLE `categories` ( -- this table shows information related to Koha patr Link Here
327
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron category if this item has previously been checked out to this patron if 'yes', not if 'no', defer to syspref setting if 'inherit'.
327
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron category if this item has previously been checked out to this patron if 'yes', not if 'no', defer to syspref setting if 'inherit'.
328
  `reset_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can do the password reset flow,
328
  `reset_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can do the password reset flow,
329
  `change_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can change their passwords in the OAPC
329
  `change_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can change their passwords in the OAPC
330
  `exclude_from_local_holds_priority` tinyint(1) default NULL, -- Exclude patrons of this category from local holds priority
330
  PRIMARY KEY  (`categorycode`),
331
  PRIMARY KEY  (`categorycode`),
331
  UNIQUE KEY `categorycode` (`categorycode`)
332
  UNIQUE KEY `categorycode` (`categorycode`)
332
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
333
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Lines 664-669 CREATE TABLE `deleteditems` ( Link Here
664
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
665
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
665
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
666
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
666
  `new_status` VARCHAR(32) DEFAULT NULL, -- 'new' value, you can put whatever free-text information. This field is intented to be managed by the automatic_item_modification_by_age cronjob.
667
  `new_status` VARCHAR(32) DEFAULT NULL, -- 'new' value, you can put whatever free-text information. This field is intented to be managed by the automatic_item_modification_by_age cronjob.
668
  `exclude_from_local_holds_priority` tinyint(1) default NULL, -- Exclude this item from local holds priority
667
  PRIMARY KEY  (`itemnumber`),
669
  PRIMARY KEY  (`itemnumber`),
668
  KEY `delitembarcodeidx` (`barcode`),
670
  KEY `delitembarcodeidx` (`barcode`),
669
  KEY `delitemstocknumberidx` (`stocknumber`),
671
  KEY `delitemstocknumberidx` (`stocknumber`),
Lines 869-874 CREATE TABLE `items` ( -- holdings/item information Link Here
869
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
871
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
870
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
872
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
871
  `new_status` VARCHAR(32) DEFAULT NULL, -- 'new' value, you can put whatever free-text information. This field is intented to be managed by the automatic_item_modification_by_age cronjob.
873
  `new_status` VARCHAR(32) DEFAULT NULL, -- 'new' value, you can put whatever free-text information. This field is intented to be managed by the automatic_item_modification_by_age cronjob.
874
  `exclude_from_local_holds_priority` tinyint(1) default NULL, -- Exclude this item from local holds priority
872
  PRIMARY KEY  (`itemnumber`),
875
  PRIMARY KEY  (`itemnumber`),
873
  UNIQUE KEY `itembarcodeidx` (`barcode`),
876
  UNIQUE KEY `itembarcodeidx` (`barcode`),
874
  KEY `itemstocknumberidx` (`stocknumber`),
877
  KEY `itemstocknumberidx` (`stocknumber`),
875
- 

Return to bug 19889