Bug 36790

Summary: 230600052.pl is failing
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED FIXED QA Contact: Tomás Cohen Arazi (tcohen) <tomascohen>
Severity: blocker    
Priority: P5 - low CC: fridolin.somers, lucas, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.06
Circulation function:
Bug Depends on: 8838, 25159, 33478    
Bug Blocks:    
Attachments: Bug 36790: List table columns for 230600052 queries
Bug 36790: List table columns for 230600052 queries
Bug 36790: List table columns for 230600052 queries
Bug 36790: List table columns for 230600052 queries

Description Jonathan Druart 2024-05-06 10:58:11 UTC
From jenkins:
koha_1       | ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Column count doesn't match value count at row 1 at /kohadevbox/koha/C4/Installer.pm line 741
Comment 1 Jonathan Druart 2024-05-06 11:00:14 UTC
Created attachment 166204 [details] [review]
Bug 36790: List table columns for 230600052 queries

We must list the columns, or the db rev will fail when a new column is
added. It happened here when 33478 added 'style'

Also remove id and dates
Comment 2 Tomás Cohen Arazi (tcohen) 2024-05-06 11:44:06 UTC
Hi, I set all my environment to test this, but it is not applying. Please adjust dependencies if required.

Thanks
Comment 3 Jonathan Druart 2024-05-06 12:19:12 UTC
Created attachment 166218 [details] [review]
Bug 36790: List table columns for 230600052 queries

We must list the columns, or the db rev will fail when a new column is
added. It happened here when 33478 added 'style'

Also remove id and dates
Comment 4 Jonathan Druart 2024-05-06 12:19:45 UTC
Sorry, I embedded non-related changes!
Comment 5 Tomás Cohen Arazi (tcohen) 2024-05-06 12:38:59 UTC
Created attachment 166220 [details] [review]
Bug 36790: List table columns for 230600052 queries

We must list the columns, or the db rev will fail when a new column is
added. It happened here when 33478 added 'style'

Also remove id and dates

To test:
1. On current main, run:
   $ ktd --shell
  k$ perl /kohadevbox/misc4dev/run_tests.pl --koha-dir=. --run-db-upgrade-only
=> FAIL: Tests explode for DB query issues
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Tomás Cohen Arazi (tcohen) 2024-05-06 12:39:48 UTC
Added a dependency on bug 25159, as I had to add a follow-up there for this to actually work.
Comment 7 Kyle M Hall (khall) 2024-05-06 12:46:25 UTC
Created attachment 166221 [details] [review]
Bug 36790: List table columns for 230600052 queries

We must list the columns, or the db rev will fail when a new column is
added. It happened here when 33478 added 'style'

Also remove id and dates

To test:
1. On current main, run:
   $ ktd --shell
  k$ perl /kohadevbox/misc4dev/run_tests.pl --koha-dir=. --run-db-upgrade-only
=> FAIL: Tests explode for DB query issues
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Katrin Fischer 2024-05-06 13:05:04 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 9 Fridolin Somers 2024-05-22 12:03:41 UTC
Bug 25159 and Bug 33478 not in 23.11.x but maybe needs this fix ?
Comment 10 Fridolin Somers 2024-05-23 07:47:22 UTC
Pushed to 23.11.x for 23.11.06

(Joubu confirmed)
Comment 11 Lucas Gass (lukeg) 2024-05-28 15:53:55 UTC
Not needed in 23.05.x, no backport.