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 325-330 CREATE TABLE `categories` ( -- this table shows information related to Koha patr Link Here
325
  `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'.
325
  `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'.
326
  `reset_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can do the password reset flow,
326
  `reset_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can do the password reset flow,
327
  `change_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can change their passwords in the OAPC
327
  `change_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can change their passwords in the OAPC
328
  `exclude_from_local_holds_priority` tinyint(1) default NULL, -- Exclude patrons of this category from local holds priority
328
  PRIMARY KEY  (`categorycode`),
329
  PRIMARY KEY  (`categorycode`),
329
  UNIQUE KEY `categorycode` (`categorycode`)
330
  UNIQUE KEY `categorycode` (`categorycode`)
330
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
331
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Lines 662-667 CREATE TABLE `deleteditems` ( Link Here
662
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
663
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
663
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
664
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
664
  `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.
665
  `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.
666
  `exclude_from_local_holds_priority` tinyint(1) default NULL, -- Exclude this item from local holds priority
665
  PRIMARY KEY  (`itemnumber`),
667
  PRIMARY KEY  (`itemnumber`),
666
  KEY `delitembarcodeidx` (`barcode`),
668
  KEY `delitembarcodeidx` (`barcode`),
667
  KEY `delitemstocknumberidx` (`stocknumber`),
669
  KEY `delitemstocknumberidx` (`stocknumber`),
Lines 867-872 CREATE TABLE `items` ( -- holdings/item information Link Here
867
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
869
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
868
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
870
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
869
  `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.
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.
872
  `exclude_from_local_holds_priority` tinyint(1) default NULL, -- Exclude this item from local holds priority
870
  PRIMARY KEY  (`itemnumber`),
873
  PRIMARY KEY  (`itemnumber`),
871
  UNIQUE KEY `itembarcodeidx` (`barcode`),
874
  UNIQUE KEY `itembarcodeidx` (`barcode`),
872
  KEY `itemstocknumberidx` (`stocknumber`),
875
  KEY `itemstocknumberidx` (`stocknumber`),
873
- 

Return to bug 19889