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 1624-1629 CREATE TABLE `categories` ( Link Here
1624
  `require_strong_password` tinyint(1) DEFAULT NULL COMMENT 'set required password strength for patrons in this category',
1624
  `require_strong_password` tinyint(1) DEFAULT NULL COMMENT 'set required password strength for patrons in this category',
1625
  `exclude_from_local_holds_priority` tinyint(1) DEFAULT NULL COMMENT 'Exclude patrons of this category from local holds priority',
1625
  `exclude_from_local_holds_priority` tinyint(1) DEFAULT NULL COMMENT 'Exclude patrons of this category from local holds priority',
1626
  `article_request_fee` decimal(28,6) DEFAULT NULL COMMENT 'Cost for article scan request',
1626
  `article_request_fee` decimal(28,6) DEFAULT NULL COMMENT 'Cost for article scan request',
1627
  `article_request_limit` tinyint(4) DEFAULT NULL COMMENT 'Limit article scan requests per day',
1627
  PRIMARY KEY (`categorycode`),
1628
  PRIMARY KEY (`categorycode`),
1628
  UNIQUE KEY `categorycode` (`categorycode`)
1629
  UNIQUE KEY `categorycode` (`categorycode`)
1629
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1630
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1630
- 

Return to bug 27945