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

--- Comment #60 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 203162
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203162&action=edit
Bug 42310: (QA follow-up) Report duplicate rows skipped during migration

The new calendar tables add UNIQUE(library_id, weekday),
UNIQUE(library_id, day, month) and UNIQUE(library_id, date) constraints
that did not exist on repeatable_holidays / special_holidays, so the
INSERT IGNORE migration can silently drop legacy duplicate rows.

This patch compares source vs destination row counts for each of the
four migrations and emits a say_warning naming the constraint and
pointing the operator at their pre-upgrade backup so titles or
descriptions can be recovered if needed. Success lines now include
the migrated row count. DROP statements for the legacy tables are
guarded with TableExists and reported via say_success for
consistency with the rest of the atomicupdate.

Test plan:
1) Apply the update on a database containing legacy duplicates and
   verify the warning is emitted with the correct count.
2) Apply on a database with no duplicates and verify no warning
   appears.
3) Re-run the update and verify it is idempotent (no warnings, no
   re-migration).

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to