Bugzilla – Attachment 12173 Details for
Bug 4118
Add Collection Code (CCODE) to Statistics Table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4118 - Add Collection Code to Statistics Table - Followup
Bug-4118---Add-Collection-Code-to-Statistics-Table.patch (text/plain), 1.87 KB, created by
Kyle M Hall (khall)
on 2012-09-12 16:11:30 UTC
(
hide
)
Description:
Bug 4118 - Add Collection Code to Statistics Table - Followup
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2012-09-12 16:11:30 UTC
Size:
1.87 KB
patch
obsolete
>From 04b6ba4077a96d2dceda7d6d41981246ad5f1350 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 12 Sep 2012 12:11:08 -0400 >Subject: [PATCH] Bug 4118 - Add Collection Code to Statistics Table - Followup >Content-Type: text/plain; charset="utf-8" > >--- > installer/data/mysql/updatedatabase.pl | 15 ++++++++++----- > 1 files changed, 10 insertions(+), 5 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index eb4f2fe..b58ea4a 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -5718,11 +5718,16 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > $DBversion = '3.09.00.XXX'; > if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > $dbh->do("ALTER TABLE statistics ADD COLUMN ccode VARCHAR ( 10 ) NULL AFTER associatedborrower"); >- $dbh->do("UPDATE statistics SET statistics.ccode = ( SELECT items.ccode FROM items WHERE statistics.itemnumber = items.itemnumber )"); >- $dbh->do("UPDATE statistics SET statistics.ccode = ( >- SELECT deleteditems.ccode FROM deleteditems >- WHERE statistics.itemnumber = deleteditems.itemnumber >- ) WHERE statistics.ccode IS NULL"); >+ $dbh->do(" >+ UPDATE statistics SET statistics.ccode = ( >+ SELECT items.ccode FROM items WHERE statistics.itemnumber = items.itemnumber >+ ) WHERE statistics.type != 'payment' AND statistics.type != 'writeoff' >+ "); >+ $dbh->do(" >+ UPDATE statistics SET statistics.ccode = ( >+ SELECT deleteditems.ccode FROM deleteditems WHERE statistics.itemnumber = deleteditems.itemnumber >+ ) WHERE statistics.ccode IS NULL AND statistics.type != 'payment' AND statistics.type != 'writeoff' >+ "); > print "Upgrade done ( Added Collection Code to Statistics table. )\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 4118
:
1848
|
1849
|
10164
|
10165
|
10213
|
10214
|
10602
|
10603
|
10604
|
10605
|
10887
|
11322
|
12172
|
12173
|
12792
|
12793
|
12795