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

(-)a/installer/data/mysql/atomicupdate/bug_30301-add_flag_to_enforce_expiry_notice.pl (+23 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "30301",
6
    description => "Add a flag to enforce expiry notices",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        unless ( column_exists( 'categories', 'enforce_expiry_notice' ) ) {
12
            $dbh->do(
13
                q{
14
                ALTER TABLE categories ADD COLUMN `enforce_expiry_notice` tinyint(1) NOT NULL DEFAULT 0
15
                COMMENT "enforce the patron expiry notice for this category"
16
                AFTER `noissueschargeguarantorswithguarantees`
17
                }
18
            );
19
20
            say_success( $out, "Added column 'enforce_expiry_notice' to categories" );
21
        }
22
    },
23
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1820-1825 CREATE TABLE `categories` ( Link Here
1820
  `noissuescharge` int(11) DEFAULT NULL COMMENT 'define maximum amount outstanding before checkouts are blocked',
1820
  `noissuescharge` int(11) DEFAULT NULL COMMENT 'define maximum amount outstanding before checkouts are blocked',
1821
  `noissueschargeguarantees` int(11) DEFAULT NULL COMMENT 'define maximum amount that the guarantees of a patron in this category can have outstanding before checkouts are blocked',
1821
  `noissueschargeguarantees` int(11) DEFAULT NULL COMMENT 'define maximum amount that the guarantees of a patron in this category can have outstanding before checkouts are blocked',
1822
  `noissueschargeguarantorswithguarantees` int(11) DEFAULT NULL COMMENT 'define maximum amount that the guarantors with guarantees of a patron in this category can have outstanding before checkouts are blocked',
1822
  `noissueschargeguarantorswithguarantees` int(11) DEFAULT NULL COMMENT 'define maximum amount that the guarantors with guarantees of a patron in this category can have outstanding before checkouts are blocked',
1823
  `enforce_expiry_notice` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'enforce the patron expiry notice for this category',
1823
  PRIMARY KEY (`categorycode`),
1824
  PRIMARY KEY (`categorycode`),
1824
  UNIQUE KEY `categorycode` (`categorycode`)
1825
  UNIQUE KEY `categorycode` (`categorycode`)
1825
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1826
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1826
- 

Return to bug 30301