Bug 38922

Summary: auth_header.origincode and auth_header.linkid never used -- shouldn't it be removed?
Product: Koha Reporter: Janusz Kaczmarek <januszop>
Component: DatabaseAssignee: Janusz Kaczmarek <januszop>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: m.de.rooy, schodkowy.omegi-0r
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 38922: Remove auth_header.origincode, auth_heder.linkid, deletedauth_header.origincode, deletedauth_header.linkid and auth_subfield_structure.linkid from existing installations
Bug 38922: Remove auth_header.origincode, auth_heder.linkid, deletedauth_header.origincode, deletedauth_header.linkid and auth_subfield_structure.linkid from new installations
Bug 38922: Remove references to auth_header.origincode and auth_heder.linkid from the code
Bug 38922: Test data adjustment
Bug 38922: Remove auth_header.origincode, auth_heder.linkid, deletedauth_header.origincode, deletedauth_header.linkid and auth_subfield_structure.linkid from existing installations
Bug 38922: Remove auth_header.origincode, auth_heder.linkid, deletedauth_header.origincode, deletedauth_header.linkid and auth_subfield_structure.linkid from new installations
Bug 38922: Remove references to auth_header.origincode and auth_heder.linkid from the code
Bug 38922: Test data adjustment

Description Janusz Kaczmarek 2025-01-18 18:22:30 UTC
It seems that the column auth_header.origincode is never used in the code. This column exists from the beginning of auth_header table. BTW, a similar column was present also in marc_biblio in ancient times (e.g. in R_2_2_5), but disappeared in 3.00.00.

Shouldn't this column be removed?
Comment 1 Janusz Kaczmarek 2025-04-04 19:03:50 UTC
Created attachment 180671 [details] [review]
Bug 38922: Remove auth_header.origincode, auth_heder.linkid, deletedauth_header.origincode, deletedauth_header.linkid and auth_subfield_structure.linkid from existing installations
Comment 2 Janusz Kaczmarek 2025-04-04 19:03:53 UTC
Created attachment 180672 [details] [review]
Bug 38922: Remove auth_header.origincode, auth_heder.linkid, deletedauth_header.origincode, deletedauth_header.linkid and auth_subfield_structure.linkid from new installations
Comment 3 Janusz Kaczmarek 2025-04-04 19:03:56 UTC
Created attachment 180673 [details] [review]
Bug 38922: Remove references to auth_header.origincode and auth_heder.linkid from the code
Comment 4 Janusz Kaczmarek 2025-04-04 19:03:58 UTC
Created attachment 180674 [details] [review]
Bug 38922: Test data adjustment
Comment 5 Janusz Kaczmarek 2025-04-04 19:08:42 UTC
It seems that the column auth_header.origincode is never used in the code. This column exists from the beginning of auth_header table. BTW, a similar column was present also in marc_biblio in ancient times (e.g. in R_2_2_5), but disappeared in 3.00.00.

Same for auth_header.linkid -- the last meaningful use of this column was removed by commit b767f50c in 2007.

Test plan:

1. git grep for `origincode` and `linkid` before applying the patch to control that there is no meaningful use of these columns
2. apply the patch ; updatedatabase
3. git grep for `origincode` and `linkid`. Note that 'linkid' in .tt and .js is a completely different linkid.
4. prove t/db_dependent/ImportExportFramework.t
Comment 6 Roman Dolny 2025-04-04 20:16:30 UTC
Created attachment 180677 [details] [review]
Bug 38922: Remove auth_header.origincode, auth_heder.linkid, deletedauth_header.origincode, deletedauth_header.linkid and auth_subfield_structure.linkid from existing installations

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 7 Roman Dolny 2025-04-04 20:16:34 UTC
Created attachment 180678 [details] [review]
Bug 38922: Remove auth_header.origincode, auth_heder.linkid, deletedauth_header.origincode, deletedauth_header.linkid and auth_subfield_structure.linkid from new installations

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 8 Roman Dolny 2025-04-04 20:16:36 UTC
Created attachment 180679 [details] [review]
Bug 38922: Remove references to auth_header.origincode and auth_heder.linkid from the code

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 9 Roman Dolny 2025-04-04 20:16:39 UTC
Created attachment 180680 [details] [review]
Bug 38922: Test data adjustment

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>