Bug 14899: DB changes
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 25 Sep 2015 15:06:07 +0000 (16:06 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 26 Apr 2016 13:00:07 +0000 (10:00 -0300)
commita1ae514e4329a4fb8373d32b0b41ac619ae1ea92
tree3ced4e9186fad2fe303390c4f31263bb328553d6
parentfa6f77cc71fc6069d5c0dc527e7a8e0d2e06635d
Bug 14899: DB changes

This patch applies several changes to the DB structure introduced by
the previous ES patch set:

1/ Add a search_field.label column
=> It will be easier to understand what the search_field does.
Indeed, some are not user friendly: acqdate, an, pl, ff8-23, ln, etc.
TODO later: Update the labels with correct values (at the moment
label=name)

2/ Update the foreign key search_marc_to_field.search_marc_map_id with
on delete cascase. This will permit to automatically remove the entries
in search_marc_to_field when they are deleted in search_marc_map.

3/ Remove the index_name_2 unique constraint on the search_marc_map table.
I don't understand how this could be useful, it was defined like (index_name,
marc_type, marc_field), so it means a mapping cannot be defined twice with
different values for facet, suggestible and sort.
This limitation does not seem to make sense.
Robin, please correct me if I am wrong :)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Schema/Result/SearchField.pm
Koha/Schema/Result/SearchMarcMap.pm
Koha/Schema/Result/SearchMarcToField.pm
installer/data/mysql/updatedatabase.pl