Bugzilla – Attachment 103742 Details for
Bug 23081
Make items.issues and deleteditems.issues default to 0 instead of null
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23081: atomicupdate for change to existing installs
Bug-23081-atomicupdate-for-change-to-existing-inst.patch (text/plain), 1.52 KB, created by
Jonathan Druart
on 2020-04-27 09:57:29 UTC
(
hide
)
Description:
Bug 23081: atomicupdate for change to existing installs
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-27 09:57:29 UTC
Size:
1.52 KB
patch
obsolete
>From 77c8812014616c0ba508011407019578df1a977f Mon Sep 17 00:00:00 2001 >From: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >Date: Sun, 26 Apr 2020 23:53:26 +0000 >Subject: [PATCH] Bug 23081: atomicupdate for change to existing installs > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../bug_23081-change-default-of-issues-field.perl | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_23081-change-default-of-issues-field.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_23081-change-default-of-issues-field.perl b/installer/data/mysql/atomicupdate/bug_23081-change-default-of-issues-field.perl >new file mode 100644 >index 0000000000..204d9999b3 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_23081-change-default-of-issues-field.perl >@@ -0,0 +1,15 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ # you can use $dbh here like: >+ $dbh->do( "UPDATE items set issues=0 where issues is null" ); >+ $dbh->do( "UPDATE deleteditems set issues=0 where issues is null" ); >+ $dbh->do( "ALTER TABLE items ALTER issues set default 0" ); >+ $dbh->do( "ALTER TABLE deleteditems ALTER issues set default 0" ); >+ # or perform some test and warn >+ # if( !column_exists( 'biblio', 'biblionumber' ) ) { >+ # warn "There is something wrong"; >+ # } >+ >+ # Always end with this (adjust the bug info) >+ NewVersion( $DBversion, 23081, "Set default to 0 for items.issues"); >+} >-- >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 23081
:
103601
|
103605
|
103606
|
103608
|
103725
|
103726
|
103741
| 103742 |
103743
|
103744
|
104706