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

(-)a/installer/data/mysql/atomicupdate/bug_27945.perl (+15 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    # you can use $dbh here like:
4
    # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" );
5
6
    # or perform some test and warn
7
    if( !column_exists( 'categories', 'article_request_limit' ) ) {
8
      $dbh->do(q{
9
        ALTER TABLE `categories` ADD COLUMN `article_request_limit` tinyint(4) DEFAULT NULL COMMENT 'Limit article scan requests per day' AFTER `article_request_fee`
10
      });
11
    }
12
13
    # Always end with this (adjust the bug info)
14
    NewVersion( $DBversion, 27945, "Add article_request_limit to categories table");
15
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1621-1626 CREATE TABLE `categories` ( Link Here
1621
  `min_password_length` smallint(6) DEFAULT NULL COMMENT 'set minimum password length for patrons in this category',
1621
  `min_password_length` smallint(6) DEFAULT NULL COMMENT 'set minimum password length for patrons in this category',
1622
  `require_strong_password` tinyint(1) DEFAULT NULL COMMENT 'set required password strength for patrons in this category',
1622
  `require_strong_password` tinyint(1) DEFAULT NULL COMMENT 'set required password strength for patrons in this category',
1623
  `exclude_from_local_holds_priority` tinyint(1) DEFAULT NULL COMMENT 'Exclude patrons of this category from local holds priority',
1623
  `exclude_from_local_holds_priority` tinyint(1) DEFAULT NULL COMMENT 'Exclude patrons of this category from local holds priority',
1624
  `article_request_limit` tinyint(4) DEFAULT NULL COMMENT 'Limit article scan requests per day',
1624
  PRIMARY KEY (`categorycode`),
1625
  PRIMARY KEY (`categorycode`),
1625
  UNIQUE KEY `categorycode` (`categorycode`)
1626
  UNIQUE KEY `categorycode` (`categorycode`)
1626
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1627
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1627
- 

Return to bug 27945