Bug 30572 - Field search_marc_to_field.sort needs syncing too
Summary: Field search_marc_to_field.sort needs syncing too
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 30486
  Show dependency treegraph
 
Reported: 2022-04-20 14:56 UTC by Marcel de Rooy
Modified: 2022-06-23 13:44 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact: Martin Renvoize
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.06


Attachments
Bug 30572: Adjust search_marc_to_field.sort in kohastructure (1.49 KB, patch)
2022-04-21 12:52 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30572: Dbrev for search_marc_to_field.sort (1.21 KB, patch)
2022-04-21 12:52 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30572: DBIx schema change for SearchMarcToField (1.67 KB, patch)
2022-04-21 12:52 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30572: Adjust search_marc_to_field.sort in kohastructure (1.52 KB, patch)
2022-04-26 13:15 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30572: Dbrev for search_marc_to_field.sort (1.24 KB, patch)
2022-04-26 13:15 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30572: DBIx schema change for SearchMarcToField (1.70 KB, patch)
2022-04-26 13:15 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30572: (QA follow-up) Fix failing unit test (2.54 KB, patch)
2022-05-05 16:13 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2022-04-20 14:56:30 UTC
$DBversion = '20.11.03.003';
if( CheckVersion( $DBversion ) ) {
    $dbh->do( "UPDATE search_marc_to_field SET sort = 1 WHERE sort IS NULL" );
    $dbh->do( "ALTER TABLE search_marc_to_field MODIFY COLUMN sort tinyint(1) DEFAULT 1 NOT NULL COMMENT 'Sort defaults to 1 (Yes) and creates sort fields in the index, 0 (no) will prevent this'" );

kohastructure:

CREATE TABLE `search_marc_to_field` (
  `sort` tinyint(1) DEFAULT NULL COMMENT 'true/false creates special sort handling, null doesn''t',
Comment 1 Marcel de Rooy 2022-04-21 12:52:01 UTC
Created attachment 133552 [details] [review]
Bug 30572: Adjust search_marc_to_field.sort in kohastructure

Test plan:
New install or run kohastructure on empty database.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2022-04-21 12:52:05 UTC
Created attachment 133553 [details] [review]
Bug 30572: Dbrev for search_marc_to_field.sort

Test plan:
Run updatedatabase.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2022-04-21 12:52:09 UTC
Created attachment 133554 [details] [review]
Bug 30572: DBIx schema change for SearchMarcToField

No test plan.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2022-04-21 12:53:12 UTC
Trivial: self SO
Comment 5 Martin Renvoize 2022-04-26 13:15:30 UTC
Created attachment 133892 [details] [review]
Bug 30572: Adjust search_marc_to_field.sort in kohastructure

Test plan:
New install or run kohastructure on empty database.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2022-04-26 13:15:34 UTC
Created attachment 133893 [details] [review]
Bug 30572: Dbrev for search_marc_to_field.sort

Test plan:
Run updatedatabase.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2022-04-26 13:15:38 UTC
Created attachment 133894 [details] [review]
Bug 30572: DBIx schema change for SearchMarcToField

No test plan.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2022-04-26 13:16:01 UTC
Works well, PQA
Comment 9 Fridolin Somers 2022-05-02 21:25:35 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 10 Martin Renvoize 2022-05-05 16:09:47 UTC
This leads to failures on t/db_dependent/Koha/SearchEngine/Elasticsearch/ExportConfig.t
Comment 11 Martin Renvoize 2022-05-05 16:13:53 UTC
Created attachment 134655 [details] [review]
Bug 30572: (QA follow-up) Fix failing unit test

We changed from 'null' being meainingful to using a tinyint and
explicitly requiring '0'.  This patch simply updates the unit test to
reflect that change.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize 2022-05-05 16:14:35 UTC
Follow-up pushed to master, lets turn Jenkins green!
Comment 13 Kyle M Hall 2022-05-06 18:01:21 UTC
Pushed to 21.11.x for 21.11.06
Comment 14 Victor Grousset/tuxayo 2022-06-23 01:43:51 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.
Comment 15 Martin Renvoize 2022-06-23 13:44:56 UTC
Another background thing, Not documentation changes required.