From updatedatabase.pl: $dbh->do("ALTER TABLE statistics ADD COLUMN ccode VARCHAR ( 10 ) NULL AFTER associatedborrower"); From kohastructure.sql: `ccode` int(11) default NULL, -- foreign key from the items table, links transaction to a specific collection code I believe the variant in updatedatabase.pl is probably what was wanted. Also, further testing is needed to confirm that the update works at all, as it seems not to have run at all when I updated my system past 3.09.00.044.
I'm on it, patch coming in a few minuts
Created attachment 13575 [details] [review] Bug 9064: fix statistics.ccode column From updatedatabase.pl: $dbh->do("ALTER TABLE statistics ADD COLUMN ccode VARCHAR ( 10 ) NULL AFTER associatedborrower"); From kohastructure.sql: `ccode` int(11) default NULL, -- foreign key from the items table, links transaction to a specific collection code The variant in updatedatabase.pl is probably what was wanted. This patch fixes the kohastructure and add another updatedatabase.pl, in case someone has a broken install. This should not happen, because 3.10.0 still not released, but just in case...
I haven't investigated the 2nd part of jared description (Also, further testing is needed to confirm that the update works at all, as it seems not to have run at all when I updated my system past 3.09.00.044.) but this patch at least solves the 1st part !
(In reply to comment #0) > Also, further testing is needed to confirm that the update works at all, as > it seems not to have run at all when I updated my system past 3.09.00.044. In my database there's no ccode. I've filled some manually, run the queries in the updatedatabase, and it worked well. The queries also seems correct & logic. Conclusion = I'm not sure the 2nd part of your description is relevant, more information welcomed if you really think we should investigate more.
(In reply to comment #4) > (In reply to comment #0) > > Also, further testing is needed to confirm that the update works at all, as > > it seems not to have run at all when I updated my system past 3.09.00.044. > > In my database there's no ccode. I've filled some manually, run the queries > in the updatedatabase, and it worked well. > > The queries also seems correct & logic. > > Conclusion = I'm not sure the 2nd part of your description is relevant, more > information welcomed if you really think we should investigate more. If the column was created in your database, we can just chalk it up to a momentary glitch on my system. The problem was not that the ccode column wasn't populated correctly. The problem was that the ccode column wasn't created at all.
(In reply to comment #5) > If the column was created in your database, we can just chalk it up to a > momentary glitch on my system. The problem was not that the ccode column > wasn't populated correctly. The problem was that the ccode column wasn't > created at all. yes, it was created on my system. Maybe, you already had the 044 revision, from a patch you'd tested previously, so the updatedatabase was skipped ? (thanks the new db update mechanism, that will solve this problem ;-) ) let's signoff the patch for the 1st problem then !
Created attachment 13576 [details] [review] Bug 9064: fix statistics.ccode column From updatedatabase.pl: $dbh->do("ALTER TABLE statistics ADD COLUMN ccode VARCHAR ( 10 ) NULL AFTER associatedborrower"); From kohastructure.sql: `ccode` int(11) default NULL, -- foreign key from the items table, links transaction to a specific collection code The variant in updatedatabase.pl is probably what was wanted. This patch fixes the kohastructure and add another updatedatabase.pl, in case someone has a broken install. This should not happen, because 3.10.0 still not released, but just in case... Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Modify a wrong DB structure Passed QA.
This patch has been pushed to master.
Patch pushed to branch 3.10.x
Released in 3.10.0
Created attachment 40431 [details] Add an attachment