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

(-)a/installer/data/mysql/atomicupdate/bug_28924-noissuescharges.pl (+26 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "28924",
5
    description => "Adds columns to patron categories to allow category level values for the no issue charge sysprefs",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        unless ( column_exists( 'categories', 'noissuescharge' ) ) {
11
            $dbh->do(q{ ALTER TABLE categories ADD COLUMN `noissuescharge` int(11) AFTER `exclude_from_local_holds_priority` });
12
13
            say $out "Added column 'noissuescharge' to categories";
14
        }
15
        unless ( column_exists( 'categories', 'noissueschargeguarantees' ) ) {
16
            $dbh->do(q{ ALTER TABLE categories ADD COLUMN `noissueschargeguarantees` int(11) AFTER `noissuescharge` });
17
18
            say $out "Added column 'noissueschargeguarantees' to categories";
19
        }
20
        unless ( column_exists( 'categories', 'noissueschargeguarantorswithguarantees' ) ) {
21
            $dbh->do(q{ ALTER TABLE categories ADD COLUMN `noissueschargeguarantorswithguarantees` int(11) AFTER `noissueschargeguarantees` });
22
23
            say $out "Added column 'noissueschargeguarantorswithguarantees' to categories";
24
        }
25
    },
26
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +3 lines)
Lines 1817-1822 CREATE TABLE `categories` ( Link Here
1817
  `min_password_length` smallint(6) DEFAULT NULL COMMENT 'set minimum password length for patrons in this category',
1817
  `min_password_length` smallint(6) DEFAULT NULL COMMENT 'set minimum password length for patrons in this category',
1818
  `require_strong_password` tinyint(1) DEFAULT NULL COMMENT 'set required password strength for patrons in this category',
1818
  `require_strong_password` tinyint(1) DEFAULT NULL COMMENT 'set required password strength for patrons in this category',
1819
  `exclude_from_local_holds_priority` tinyint(1) DEFAULT NULL COMMENT 'Exclude patrons of this category from local holds priority',
1819
  `exclude_from_local_holds_priority` tinyint(1) DEFAULT NULL COMMENT 'Exclude patrons of this category from local holds priority',
1820
  `noissuescharge` int(11) DEFAULT NULL COMMENT 'define maximum amount withstanding before checkouts are blocked',
1821
  `noissueschargeguarantees` int(11) DEFAULT NULL COMMENT 'define maximum amount withstanding before checkouts are blocked',
1822
  `noissueschargeguarantorswithguarantees` int(11) DEFAULT NULL COMMENT 'define maximum amount withstanding before checkouts are blocked',
1820
  PRIMARY KEY (`categorycode`),
1823
  PRIMARY KEY (`categorycode`),
1821
  UNIQUE KEY `categorycode` (`categorycode`)
1824
  UNIQUE KEY `categorycode` (`categorycode`)
1822
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1825
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1823
- 

Return to bug 28924