Bugzilla – Attachment 38081 Details for
Bug 13790
Add unique id issue_id to issues and old_issues tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13790 [QA Followup]
Bug-13790-QA-Followup.patch (text/plain), 1.57 KB, created by
Kyle M Hall (khall)
on 2015-04-17 15:01:06 UTC
(
hide
)
Description:
Bug 13790 [QA Followup]
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-04-17 15:01:06 UTC
Size:
1.57 KB
patch
obsolete
>From b6a4c6dc00830a7734dbf332e4838827e9a30855 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 17 Apr 2015 11:00:52 -0400 >Subject: [PATCH] Bug 13790 [QA Followup] > >--- > installer/data/mysql/updatedatabase.pl | 15 +++++++-------- > 1 files changed, 7 insertions(+), 8 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 356e379..bb1b9a7 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -37,7 +37,6 @@ use Getopt::Long; > use C4::Context; > use C4::Installer; > use C4::Dates; >-use Koha::Database; > > use MARC::Record; > use MARC::File::XML ( BinaryEncoding => 'utf8' ); >@@ -10064,14 +10063,14 @@ if(CheckVersion($DBversion)) { > UPDATE issues SET issue_id = issue_id + ( SELECT COUNT(*) FROM old_issues ) ORDER BY issue_id DESC > }); > >- my $schema = Koha::Database->new()->schema(); >+ my $schema = Koha::Database->new()->schema(); > my $max_issue_id = $schema->resultset('Issue')->get_column('issue_id')->max(); >- $max_issue_id ||= $schema->resultset('OldIssue')->get_column('issue_id')->max(); >- $max_issue_id ||= 0; >- $max_issue_id++; >- $dbh->do(qq{ >- ALTER TABLE issues AUTO_INCREMENT = $max_issue_id} >- ); >+ if ($max_issue_id) { >+ $max_issue_id++; >+ $dbh->do(qq{ >+ ALTER TABLE issues AUTO_INCREMENT = $max_issue_id >+ }); >+ } > > print "Upgrade to $DBversion done (Bug 13790 - Add unique id issue_id to issues and oldissues tables)\n"; > SetVersion($DBversion); >-- >1.7.2.5
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 13790
:
36441
|
36442
|
37108
|
37109
|
37709
|
37710
|
38073
|
38081
|
38082
|
38155
|
38156
|
38157
|
38158
|
38182
|
38184
|
38349
|
38350
|
38351
|
38352
|
38353
|
38354
|
38429