[Koha] [Koha-devel] How to clean transaction table?

Vimal Kumar V. vimal0212 at gmail.com
Wed Aug 14 06:02:00 NZST 2013


Dear Hafen,

I found that Truncate command is so danagerous.
I used delete command to clean data in tables.
Using delete command I cleared data in tables "statistics" and
"accountlines".

e.g.

use koha_library;
DELETE FROM statistics;

I could erase fine amount in all transactions using following commands,

use koha_library;
*UPDATE `accountlines` SET `amount` = '';*

Thank you again,





On Tue, Aug 13, 2013 at 11:08 PM, Michael Hafen
<michael.hafen at washk12.org>wrote:

> There are several database tables involved in the transactions.  And
> cleaning them will probably be easiest from inside the database.
>
> Please be advised that running commands like the one I'm going to add
> below is very dangerous.  I advise leaving it to someone who knows
> databases.  At the least you should backup the database first.
>
> with that said, the sequence database queries would be something like:
>
> Truncate Table branchtransfers;
> Truncate Table issues;
> Truncate Table old_issues;
> Truncate Table reserves;
> Truncate Table old_reserves;
> Truncate Table tmp_holdsqueue;
> Truncate Table accountoffsets;
> Truncate Table accountlines;
> Truncate Table statistics;
> Truncate Table action_logs;
>
> Those queries will clear all the checkins/checkouts, items being
> transfered to other branches, reserves, and fines.
>
>
>
> On Tue, Aug 13, 2013 at 3:32 AM, Vimal Kumar V. <vimal0212 at gmail.com>wrote:
>
>> Dear Friends,
>>
>> Today our Koha officially started in production mode.
>>
>> Trial transaction (checkout, checkin, fines etc) details are still in
>> Koha.
>>
>> We wish to clean all transaction details from Koha and start the
>> transactions fresh from today.
>> If old transactions persist in Koha, auditors create problems at the year
>> end.
>>
>> How can we clean the transaction table and get ready for a fresh startup?
>>
>> Regards,
>> --
>> Vimal Kumar V.
>> Technical Assistant
>> Mahatma Gandhi University Library
>> Kottayam, Kerala- 686 560
>> Web: http://www.vimalkumar.info
>> Blog: http://linuxhalwa.blogspot.com http://kohageek.blogspot.in
>>
>> ---------------------------------------------------------------------------
>> "I forget what I was taught. I only remember what I have learnt"
>> -Patrick White
>> _______________________________________________
>> Koha-devel mailing list
>> Koha-devel at lists.koha-community.org
>> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
>> website : http://www.koha-community.org/
>> git : http://git.koha-community.org/
>> bugs : http://bugs.koha-community.org/
>>
>
>


-- 
Vimal Kumar V.
Technical Assistant
Mahatma Gandhi University Library
Kottayam, Kerala- 686 560
Web: http://www.vimalkumar.info
Blog: http://linuxhalwa.blogspot.com http://kohageek.blogspot.in
---------------------------------------------------------------------------
"I forget what I was taught. I only remember what I have learnt"
-Patrick White


More information about the Koha mailing list