Bug 26684 - Remove 'marc' column from auth_header table
Summary: Remove 'marc' column from auth_header table
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-15 00:14 UTC by David Cook
Modified: 2022-04-04 23:19 UTC (History)
4 users (show)

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


Attachments
Bug 26684: Remove marc from auth_header for new installs (2.23 KB, patch)
2020-10-15 01:04 UTC, David Cook
Details | Diff | Splinter Review
Bug 26684: Remove marc column from existing databases (1.00 KB, patch)
2020-10-15 01:04 UTC, David Cook
Details | Diff | Splinter Review
Bug 26684: [Do not push] Remember to update Koha::Schema::Result::AuthHeader (1.01 KB, patch)
2020-10-15 01:05 UTC, David Cook
Details | Diff | Splinter Review
Bug 26684: Remove marc from auth_header for new installs (2.29 KB, patch)
2020-10-20 06:38 UTC, Didier Gautheron
Details | Diff | Splinter Review
Bug 26684: Remove marc from auth_header for new installs (2.29 KB, patch)
2020-10-20 06:50 UTC, Didier Gautheron
Details | Diff | Splinter Review
Bug 26684: Remove marc column from existing databases (1.06 KB, patch)
2020-10-20 06:50 UTC, Didier Gautheron
Details | Diff | Splinter Review
Bug 26684: Remove marc from auth_header for new installs (2.23 KB, patch)
2020-10-21 04:50 UTC, David Cook
Details | Diff | Splinter Review
Bug 26684: Remove marc column from existing databases (1.01 KB, patch)
2020-10-21 04:50 UTC, David Cook
Details | Diff | Splinter Review
Bug 26684: [Do not push] Remember to update Koha::Schema::Result::AuthHeader (1.01 KB, patch)
2020-10-21 04:50 UTC, David Cook
Details | Diff | Splinter Review
Bug 26684: Fix atomic update (1.15 KB, patch)
2020-10-21 04:50 UTC, David Cook
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2020-10-15 00:14:56 UTC
There's no need to have a marc column in the auth_header table anymore.

We'll need to change at least the following files:
./installer/data/mysql/kohastructure.sql
./C4/AuthoritiesMarc.pm
(AddAuthority, )
t/db_dependent/Linker_FirstMatch.t

We'll also need to drop the column using updatedatabase.pl:
./installer/data/mysql/updatedatabase.pl
Comment 1 David Cook 2020-10-15 01:00:54 UTC
Actually, we'll also need to re-generate Koha/Schema/Result/AuthHeader.pm
Comment 2 David Cook 2020-10-15 01:04:52 UTC
Created attachment 111670 [details] [review]
Bug 26684: Remove marc from auth_header for new installs
Comment 3 David Cook 2020-10-15 01:04:56 UTC
Created attachment 111671 [details] [review]
Bug 26684: Remove marc column from existing databases
Comment 4 David Cook 2020-10-15 01:05:00 UTC
Created attachment 111672 [details] [review]
Bug 26684: [Do not push] Remember to update Koha::Schema::Result::AuthHeader
Comment 5 Didier Gautheron 2020-10-20 06:38:15 UTC
Created attachment 112016 [details] [review]
Bug 26684: Remove marc from auth_header for new installs

Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>
Comment 6 Didier Gautheron 2020-10-20 06:50:01 UTC
Created attachment 112018 [details] [review]
Bug 26684: Remove marc from auth_header for new installs

Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>
Comment 7 Didier Gautheron 2020-10-20 06:50:06 UTC
Created attachment 112019 [details] [review]
Bug 26684: Remove marc column from existing databases

Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>
Comment 8 Nick Clemens 2020-10-20 13:38:11 UTC
Qa tools complaints:
 FAIL	installer/data/mysql/atomicupdate/001-26684-drop_marc_column_from_auth_header.pl
   FAIL	  critic
		Code before strictures are enabled at line 1, column 1. See page 429 of PBP.
   FAIL	  file permissions
		File must have the exec flag
   FAIL	  valid
		Name "main::dbh" used only once: possible typo 


if you move the file to 'perl' many disappear, however, the bug number is missing from the update so it fails right now, also we should check the existence of the column before droppping
Comment 9 David Cook 2020-10-21 04:50:15 UTC
Created attachment 112087 [details] [review]
Bug 26684: Remove marc from auth_header for new installs
Comment 10 David Cook 2020-10-21 04:50:21 UTC
Created attachment 112088 [details] [review]
Bug 26684: Remove marc column from existing databases
Comment 11 David Cook 2020-10-21 04:50:25 UTC
Created attachment 112089 [details] [review]
Bug 26684: [Do not push] Remember to update Koha::Schema::Result::AuthHeader
Comment 12 David Cook 2020-10-21 04:50:29 UTC
Created attachment 112090 [details] [review]
Bug 26684: Fix atomic update
Comment 13 David Cook 2020-10-21 04:50:53 UTC
QA scripts and updatedatabase.pl should be happy now
Comment 14 David Nind 2021-04-10 23:02:23 UTC
Patch no longer applies 8-(..

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 26684: Remove marc from auth_header for new installs
Using index info to reconstruct a base tree...
M	C4/AuthoritiesMarc.pm
M	installer/data/mysql/kohastructure.sql
Falling back to patching base and 3-way merge...
Auto-merging installer/data/mysql/kohastructure.sql
CONFLICT (content): Merge conflict in installer/data/mysql/kohastructure.sql
Auto-merging C4/AuthoritiesMarc.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 26684: Remove marc from auth_header for new installs

Also, is there a test plan? I have no idea how to test this one...