Bugzilla – Attachment 10214 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]
[SIGNED] Bugfix 4118 - Add Collection Code to Statistics Table - DB Update
0002-Bugfix-4118-Add-Collection-Code-to-Statistics-Table-.patch (text/plain), 1.59 KB, created by
Martin Renvoize (ashimema)
on 2012-06-11 14:15:50 UTC
(
hide
)
Description:
[SIGNED] Bugfix 4118 - Add Collection Code to Statistics Table - DB Update
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2012-06-11 14:15:50 UTC
Size:
1.59 KB
patch
obsolete
>From 6aeddbe580fab4728c192aad0d1531cdb50ce554 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle.m.hall@gmail.com> >Date: Fri, 5 Feb 2010 15:29:36 +0000 >Subject: [PATCH 2/2] Bugfix 4118 - Add Collection Code to Statistics Table - DB Update >Content-Type: text/plain; charset="utf-8" > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++ > 1 files changed, 14 insertions(+), 0 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 9b02cb9..30e0bab 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -5369,6 +5369,17 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = '3.09.00.XXX'; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("ALTER TABLE `statistics` ADD `ccode` VARCHAR( 80 ) NULL ;"); >+ $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"); >+ print "Upgrade done ( Added Category Code to Statistics table. )\n"; >+ SetVersion ($DBversion); >+} > > =head1 FUNCTIONS > >@@ -5389,6 +5400,9 @@ sub TableExists { > > =head2 DropAllForeignKeys($table) > >+ >+=item DropAllForeignKeys($table) >+ > Drop all foreign keys of the table $table > > =cut >-- >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