Bug 32162 - erm_eholdings_packages_agreements does not have a primary key
Summary: erm_eholdings_packages_agreements does not have a primary key
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 32030
Blocks: 35338 35698 32161
  Show dependency treegraph
 
Reported: 2022-11-10 06:51 UTC by Jonathan Druart
Modified: 2024-01-04 08:55 UTC (History)
5 users (show)

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


Attachments
Bug 32162: Add primar key to erm_eholdings_packages_agreements (1.70 KB, patch)
2022-11-10 07:09 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 32162: Add primar key to erm_eholdings_packages_agreements (3.26 KB, patch)
2022-11-10 12:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 32162: Add primar key to erm_eholdings_packages_agreements (3.31 KB, patch)
2022-11-10 16:09 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 32162: Add primar key to erm_eholdings_packages_agreements (3.38 KB, patch)
2022-11-11 11:10 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2022-11-10 06:51:08 UTC
And TestBuilder.t is failing because of this.
Comment 1 Jonathan Druart 2022-11-10 07:09:20 UTC
Created attachment 143622 [details] [review]
Bug 32162: Add primar key to erm_eholdings_packages_agreements

Test plan:
Confirm that this change fixes the related TestBuilder.t failure
Confirm that it does not break the eRM app, try to attach an agreement
to a package.
Comment 2 Jonathan Druart 2022-11-10 12:32:12 UTC
Created attachment 143645 [details] [review]
Bug 32162: Add primar key to erm_eholdings_packages_agreements

Test plan:
Confirm that this change fixes the related TestBuilder.t failure
Confirm that it does not break the eRM app, try to attach an agreement
to a package.
Comment 3 Pedro Amorim 2022-11-10 16:09:36 UTC
Created attachment 143682 [details] [review]
Bug 32162: Add primar key to erm_eholdings_packages_agreements

Test plan:
Confirm that this change fixes the related TestBuilder.t failure
Confirm that it does not break the eRM app, try to attach an agreement
to a package.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 4 Martin Renvoize (ashimema) 2022-11-11 11:10:22 UTC
Created attachment 143771 [details] [review]
Bug 32162: Add primar key to erm_eholdings_packages_agreements

Test plan:
Confirm that this change fixes the related TestBuilder.t failure
Confirm that it does not break the eRM app, try to attach an agreement
to a package.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize (ashimema) 2022-11-11 11:11:04 UTC
Trivial correction, works as designed, no regressions.

Passing QA
Comment 6 Tomás Cohen Arazi (tcohen) 2022-11-11 12:03:21 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 7 Nick Clemens (kidclamp) 2023-01-31 16:27:44 UTC
Cannot recreate in dex system, but saw error in upgrading an install from 22.05 to 22.11:
Upgrade to 22.06.00.084  [08:06:49]: Bug 31162 - Add primary key to erm_eholdings_packages_agreements
ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CONSTRAINT erm_eholdings_packages_agreements_uniq,
                ADD PRIMARY K' at line 3 at /usr/share/koha/lib/C4/Installer.pm line 739

Bug number also wrong in the update file
Comment 8 Jonathan Druart 2023-01-31 16:48:04 UTC
What's the version of the DBMS, Nick?
Comment 9 Nick Clemens (kidclamp) 2023-01-31 18:13:41 UTC
(In reply to Jonathan Druart from comment #8)
> What's the version of the DBMS, Nick?

Server version: 5.7.12 MySQL Community Server (GPL)
Comment 10 Jonathan Druart 2023-02-01 08:44:21 UTC
(In reply to Nick Clemens from comment #9)
> (In reply to Jonathan Druart from comment #8)
> > What's the version of the DBMS, Nick?
> 
> Server version: 5.7.12 MySQL Community Server (GPL)

If this is a MySQL 5.7 thing, are we still supporting it?

See also bug 29805.
Comment 11 Jonathan Druart 2024-01-04 08:52:14 UTC
(In reply to Jonathan Druart from comment #10)
> (In reply to Nick Clemens from comment #9)
> > (In reply to Jonathan Druart from comment #8)
> > > What's the version of the DBMS, Nick?
> > 
> > Server version: 5.7.12 MySQL Community Server (GPL)
> 
> If this is a MySQL 5.7 thing, are we still supporting it?
> 
> See also bug 29805.

See bug 35338.
Comment 12 Jonathan Druart 2024-01-04 08:55:31 UTC
(In reply to Nick Clemens from comment #7)
> Bug number also wrong in the update file

Oops, fixed on bug 35698.