@@ -, +, @@ --- .../data/mysql/atomicupdate/bug_27945.perl | 15 --------------- installer/data/mysql/atomicupdate/bug_27945.pl | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 15 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_27945.perl create mode 100755 installer/data/mysql/atomicupdate/bug_27945.pl --- a/installer/data/mysql/atomicupdate/bug_27945.perl +++ a/installer/data/mysql/atomicupdate/bug_27945.perl @@ -1,15 +0,0 @@ -$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/atomicupdate/bug_27945.pl +++ a/installer/data/mysql/atomicupdate/bug_27945.pl @@ -0,0 +1,17 @@ +use Modern::Perl; + +return { + bug_number => "27945", + description => "Add article_request_limit to categories table", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + # Do you stuffs here + 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 `exclude_from_local_holds_priority` + }); + } + }, +} --