Bug 35900 - Different schema on MySQL 8
Summary: Different schema on MySQL 8
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-24 19:11 UTC by Tomás Cohen Arazi
Modified: 2024-01-24 19:11 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2024-01-24 19:11:22 UTC
I'm seeing this on the generated schema:

$ git diff Koha/Schema/Result/BorrowerDebarment.pm
diff --git a/Koha/Schema/Result/BorrowerDebarment.pm b/Koha/Schema/Result/BorrowerDebarment.pm
index da2b1413284..63d715c4f80 100644
--- a/Koha/Schema/Result/BorrowerDebarment.pm
+++ b/Koha/Schema/Result/BorrowerDebarment.pm
@@ -158,12 +158,12 @@ __PACKAGE__->belongs_to(
   "type",
   "Koha::Schema::Result::RestrictionType",
   { code => "type" },
-  { is_deferrable => 1, on_delete => "NO ACTION", on_update => "CASCADE" },
+  { is_deferrable => 1, on_delete => "RESTRICT", on_update => "CASCADE" },
 );

I'm not sure how important this is, but might be a clue for future compatibility issues. So worth reporting.

To reproduce:
1. Start a fresh KTD with MySQL 8.0:
   $ DB_IMAGE=mysql:8.0 ktd up -d
2. Run:
   $ ktd --shell
  k$ dbic
  k$ git diff
=> FAIL: There's the diff I pasted above.