Bugzilla – Attachment 56446 Details for
Bug 17356
Add atomic update .perl skeleton file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17356: [QA Follow-up] Minor changes to skeleton.perl
Bug-17356-QA-Follow-up-Minor-changes-to-skeletonpe.patch (text/plain), 1.89 KB, created by
Marcel de Rooy
on 2016-10-14 06:51:46 UTC
(
hide
)
Description:
Bug 17356: [QA Follow-up] Minor changes to skeleton.perl
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-10-14 06:51:46 UTC
Size:
1.89 KB
patch
obsolete
>From 1390914d5b3d57eda72b7f5b4f1c27395ea95655 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 14 Oct 2016 08:38:10 +0200 >Subject: [PATCH] Bug 17356: [QA Follow-up] Minor changes to skeleton.perl >Content-Type: text/plain; charset=utf-8 > >Due to the way the snippet is run, there is no need to add a use for >C4::Installer or define $dbh (just like $DBVersion). >The suggested code is commented (column_exists is not defined). >Just as in updatedatabase, CheckVersion is called. The version number >does not need to contain 16.06; if we do so, we should update this >number each release. The XXX's work just fine. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > installer/data/mysql/atomicupdate/skeleton.perl | 20 ++++++++++++-------- > 1 file changed, 12 insertions(+), 8 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/skeleton.perl b/installer/data/mysql/atomicupdate/skeleton.perl >index 6e265bf..66e599c 100644 >--- a/installer/data/mysql/atomicupdate/skeleton.perl >+++ b/installer/data/mysql/atomicupdate/skeleton.perl >@@ -1,10 +1,14 @@ >-use C4::Installer; >-my $dbh = C4::Context->dbh; >-$DBversion = '16.06.00.XXX'; >-if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >- unless( column_exists( 'biblio', 'biblionumber' ) ) { # or constraint_exists( $table_name, $key_name ) >- warn "There is something wrong"; >- } >- SetVersion ($DBversion); >+$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( 'biblio', 'biblionumber' ) ) { >+ # warn "There is something wrong"; >+ # } >+ >+ # Always end with this (adjust the bug info) >+ SetVersion( $DBversion ); > print "Upgrade to $DBversion done (Bug XXXXX - description)\n"; > } >-- >1.7.10.4
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 17356
:
55834
|
55944
|
55945
|
56444
|
56445
| 56446