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

--- Comment #122 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 209387
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209387&action=edit
Bug 42418: (QA follow-up) Make kohastructure.sql match the dump of an upgraded
DB

The DB compare CI job (misc4dev run_tests.pl --compare-with) upgrades a
database from an older kohastructure.sql, dumps it, and diffs the dump
against kohastructure.sql. Two things in the checkins table made the
diff fail:

1. The table was between cash_registers and categories. mysqldump
   sorts tables by name, so it belongs between categories_branches and
   checkout_renewals. Reported by Pedro on comment #119.

2. MariaDB lists foreign keys sorted by name, so checkins_ibfk_10 comes
   right after checkins_ibfk_1. kohastructure.sql listed them from 1 to
   10, which would have failed the job once the table was in place.

This patch moves the table and reorders its constraints. There are no
changes to the table definition, and the DBIC schema files generated
from kohastructure.sql do not change.

Test plan:
1. Apply patch
2. Run the DB compare job against main:
   $ ktd --shell
  k$ perl /kohadevbox/misc4dev/run_tests.pl --run-db-compare-only \
         --compare-with=main
=> SUCCESS: No diff for the checkins table
3. Check the table position in kohastructure.sql:
  k$ grep -n "CREATE TABLE \`c[a-h]" installer/data/mysql/kohastructure.sql
=> SUCCESS: checkins is between categories_branches and
   checkout_renewals
4. Sign off :-D

Assisted-by: Opus 5.5 (Anthropic)

-- 
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