Bugzilla – Attachment 38082 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.53 KB, created by
Kyle M Hall (khall)
on 2015-04-17 15:05:42 UTC
(
hide
)
Description:
Bug 13790 [QA Followup]
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-04-17 15:05:42 UTC
Size:
1.53 KB
patch
obsolete
>From 6949f4cef43837e14f3c3699d3ceebc5dc31bc35 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, 8 insertions(+), 7 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 356e379..e9ee13b 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -58,6 +58,8 @@ my ( > $prefitem, # preference item in systempreferences table > ); > >+my $schema = Koha::Database->new()->schema(); >+ > my $silent; > GetOptions( > 's' =>\$silent >@@ -10064,14 +10066,13 @@ 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 $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