Bugzilla – Attachment 122775 Details for
Bug 20472
Add digital scan as optional format to Article Requests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20472: Make DB rev idempotent
Bug-20472-Make-DB-rev-idempotent.patch (text/plain), 1.45 KB, created by
Jonathan Druart
on 2021-07-12 11:52:21 UTC
(
hide
)
Description:
Bug 20472: Make DB rev idempotent
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-07-12 11:52:21 UTC
Size:
1.45 KB
patch
obsolete
>From f355322dd83ef5efac9164f935ceff214fff6ba6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 12 Jul 2021 13:52:02 +0200 >Subject: [PATCH] Bug 20472: Make DB rev idempotent > >--- > .../data/mysql/atomicupdate/bug_20472a.perl | 17 ++++++++++++----- > 1 file changed, 12 insertions(+), 5 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_20472a.perl b/installer/data/mysql/atomicupdate/bug_20472a.perl >index a789245112b..66f7590d240 100644 >--- a/installer/data/mysql/atomicupdate/bug_20472a.perl >+++ b/installer/data/mysql/atomicupdate/bug_20472a.perl >@@ -1,9 +1,16 @@ > $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { >- $dbh->do(q| >- ALTER TABLE article_requests >- ADD COLUMN `format` enum('PHOTOCOPY', 'SCAN') NOT NULL DEFAULT 'PHOTOCOPY' AFTER notes, >- ADD COLUMN `urls` MEDIUMTEXT AFTER format >- |); >+ unless ( column_exists('article_requests', 'format') ) { >+ $dbh->do(q| >+ ALTER TABLE article_requests >+ ADD COLUMN `format` enum('PHOTOCOPY', 'SCAN') NOT NULL DEFAULT 'PHOTOCOPY' AFTER notes >+ |); >+ } >+ unless ( column_exists('article_requests', 'urls') ) { >+ $dbh->do(q| >+ ALTER TABLE article_requests >+ ADD COLUMN `urls` MEDIUMTEXT AFTER format >+ |); >+ } > NewVersion( $DBversion, 20472, "Add columns format and urls in article_requests table"); > } >-- >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 20472
:
107506
|
107507
|
107508
|
107509
|
107510
|
107511
|
107512
|
111473
|
111474
|
111475
|
111476
|
111477
|
111478
|
111479
|
122366
|
122367
|
122368
|
122369
|
122370
|
122371
|
122372
|
122373
|
122374
|
122375
|
122376
|
122377
|
122378
|
122379
|
122382
|
122383
|
122699
|
122700
|
122701
|
122702
|
122703
|
122704
|
122705
|
122706
| 122775 |
122781