Bugzilla – Attachment 125178 Details for
Bug 27945
Limit the number of active article requests per patron category
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27945: Move atomicupdate to new format
Bug-27945-Move-atomicupdate-to-new-format.patch (text/plain), 2.46 KB, created by
Marcel de Rooy
on 2021-09-23 06:21:24 UTC
(
hide
)
Description:
Bug 27945: Move atomicupdate to new format
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-09-23 06:21:24 UTC
Size:
2.46 KB
patch
obsolete
>From e5333051ebdb8a8350837d13ddb6a4c360b02fb8 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 22 Sep 2021 09:36:24 -0300 >Subject: [PATCH] Bug 27945: Move atomicupdate to new format >Content-Type: text/plain; charset=utf-8 > >It also removes the implicit dependency on bug 27946 by changing the >AFTER column. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../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 > >diff --git a/installer/data/mysql/atomicupdate/bug_27945.perl b/installer/data/mysql/atomicupdate/bug_27945.perl >deleted file mode 100644 >index 4a39162019..0000000000 >--- a/installer/data/mysql/atomicupdate/bug_27945.perl >+++ /dev/null >@@ -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"); >-} >diff --git a/installer/data/mysql/atomicupdate/bug_27945.pl b/installer/data/mysql/atomicupdate/bug_27945.pl >new file mode 100755 >index 0000000000..c22e530987 >--- /dev/null >+++ b/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` >+ }); >+ } >+ }, >+} >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27945
:
123217
|
123218
|
123219
|
123220
|
123714
|
123715
|
123774
|
123775
|
123776
|
123777
|
123778
|
123820
|
124066
|
124067
|
124068
|
124069
|
124070
|
124071
|
124072
|
124073
|
124074
|
124075
|
124076
|
124077
|
124078
|
124079
|
124284
|
124285
|
124633
|
124673
|
124674
|
124675
|
124676
|
124677
|
124678
|
124679
|
124680
|
124681
|
124682
|
125140
|
125142
|
125143
|
125144
|
125145
|
125146
|
125147
|
125148
|
125149
|
125150
|
125151
|
125152
|
125178
|
125179
|
125569
|
125571
|
125638
|
125690
|
125702
|
125703
|
125704
|
125705
|
125706
|
125707
|
125726
|
125741
|
125761