@@ -, +, @@ --- installer/data/mysql/atomicupdate/bug_27945.perl | 15 +++++++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 16 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_27945.perl --- a/installer/data/mysql/atomicupdate/bug_27945.perl +++ a/installer/data/mysql/atomicupdate/bug_27945.perl @@ -0,0 +1,15 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + # you can use $dbh here like: + # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" ); + + # or perform some test and warn + if( !column_exists( 'categories', 'article_request_limit' ) ) { + $dbh->do(q{ + ALTER TABLE `categories` ADD COLUMN `article_request_limit` tinyint(4) DEFAULT NULL COMMENT 'Limit article scan requests per day' AFTER `article_request_fee` + }); + } + + # Always end with this (adjust the bug info) + NewVersion( $DBversion, 27945, "Add article_request_limit to categories table"); +} --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -1624,6 +1624,7 @@ CREATE TABLE `categories` ( `require_strong_password` tinyint(1) DEFAULT NULL COMMENT 'set required password strength for patrons in this category', `exclude_from_local_holds_priority` tinyint(1) DEFAULT NULL COMMENT 'Exclude patrons of this category from local holds priority', `article_request_fee` decimal(28,6) DEFAULT NULL COMMENT 'Cost for article scan request', + `article_request_limit` tinyint(4) DEFAULT NULL COMMENT 'Limit article scan requests per day', PRIMARY KEY (`categorycode`), UNIQUE KEY `categorycode` (`categorycode`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; --