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

(-)a/installer/data/mysql/atomicupdate/bug_28924-noissuescharges.pl (+30 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(
12
                q{ ALTER TABLE categories ADD COLUMN `noissuescharge` int(11) AFTER `exclude_from_local_holds_priority` }
13
            );
14
15
            say $out "Added column 'noissuescharge' to categories";
16
        }
17
        unless ( column_exists( 'categories', 'noissueschargeguarantees' ) ) {
18
            $dbh->do(q{ ALTER TABLE categories ADD COLUMN `noissueschargeguarantees` int(11) AFTER `noissuescharge` });
19
20
            say $out "Added column 'noissueschargeguarantees' to categories";
21
        }
22
        unless ( column_exists( 'categories', 'noissueschargeguarantorswithguarantees' ) ) {
23
            $dbh->do(
24
                q{ ALTER TABLE categories ADD COLUMN `noissueschargeguarantorswithguarantees` int(11) AFTER `noissueschargeguarantees` }
25
            );
26
27
            say $out "Added column 'noissueschargeguarantorswithguarantees' to categories";
28
        }
29
    },
30
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +3 lines)
Lines 1806-1811 CREATE TABLE `categories` ( Link Here
1806
  `min_password_length` smallint(6) DEFAULT NULL COMMENT 'set minimum password length for patrons in this category',
1806
  `min_password_length` smallint(6) DEFAULT NULL COMMENT 'set minimum password length for patrons in this category',
1807
  `require_strong_password` tinyint(1) DEFAULT NULL COMMENT 'set required password strength for patrons in this category',
1807
  `require_strong_password` tinyint(1) DEFAULT NULL COMMENT 'set required password strength for patrons in this category',
1808
  `exclude_from_local_holds_priority` tinyint(1) DEFAULT NULL COMMENT 'Exclude patrons of this category from local holds priority',
1808
  `exclude_from_local_holds_priority` tinyint(1) DEFAULT NULL COMMENT 'Exclude patrons of this category from local holds priority',
1809
  `noissuescharge` int(11) DEFAULT NULL COMMENT 'define maximum amount withstanding before checkouts are blocked',
1810
  `noissueschargeguarantees` int(11) DEFAULT NULL COMMENT 'define maximum amount withstanding before checkouts are blocked',
1811
  `noissueschargeguarantorswithguarantees` int(11) DEFAULT NULL COMMENT 'define maximum amount withstanding before checkouts are blocked',
1809
  PRIMARY KEY (`categorycode`),
1812
  PRIMARY KEY (`categorycode`),
1810
  UNIQUE KEY `categorycode` (`categorycode`)
1813
  UNIQUE KEY `categorycode` (`categorycode`)
1811
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1814
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1812
- 

Return to bug 28924