https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41358

--- Comment #3 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 190625
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190625&action=edit
Bug 41358: Add migration script for legacy circulation logs

This patch adds an out-of-band migration script to convert legacy
CIRCULATION ISSUE action logs from the old itemnumber-only format
to the new consistent JSON format.

The script:
- Finds all CIRCULATION ISSUE logs where info is just an itemnumber
- Converts them to JSON format with the standard structure
- Attempts to recover issue_id and branchcode from old_issues/issues
- Runs in dry-run mode by default (--commit flag to actually update)
- Processes in batches to handle large databases safely
- Includes verbose mode for detailed output

Usage:
  perl misc/maintenance/migrate_circulation_logs_to_json.pl --help
  perl misc/maintenance/migrate_circulation_logs_to_json.pl --verbose
  perl misc/maintenance/migrate_circulation_logs_to_json.pl --commit

This is designed as an out-of-band maintenance script rather than
an atomic update because:
1. May be expensive on large databases with many log entries
2. Migration is optional - display code handles both formats
3. Can be run during off-peak hours at admin's discretion

Sponsored-by: OpenFifth <https://openfifth.co.uk/>

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to