Bug 32162

Summary: erm_eholdings_packages_agreements does not have a primary key
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, jonathan.field, martin.renvoize, nick, pedro.amorim
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29805
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Bug Depends on: 32030    
Bug Blocks: 35338, 35698, 32161    
Attachments: Bug 32162: Add primar key to erm_eholdings_packages_agreements
Bug 32162: Add primar key to erm_eholdings_packages_agreements
Bug 32162: Add primar key to erm_eholdings_packages_agreements
Bug 32162: Add primar key to erm_eholdings_packages_agreements

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 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 2022-11-11 11:11:04 UTC
Trivial correction, works as designed, no regressions.

Passing QA
Comment 6 Tomás Cohen Arazi 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.