Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 18 Jan 2019 02:25:38 +0000 (23:25 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 30 Jan 2019 11:35:34 +0000 (11:35 +0000)
commitfd30cac85ad91b74000e9878f251906bb0821783
tree36e3771de750ce600c8365b38a533ff631649a0b
parent598bdc99241909775d35561a9046423c65d4bc86
Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema

This patch makes the code using Koha::Biblio::Metadata->marcflavour use
->schema instead for all interactions.

To test:
- Update the DB structure:
  $ updatedatabase
- Update the schema files:
  $ dbic
- Notice all the places in which biblio_metadata is used
  $ cd kohaclone
  $ git grep biblio_metadata
=> SUCCESS: They all use `schema` instead of marcflavour
- Notice all the places that use Koha::Biblio::Metadata:
  $ git grep Koha::Biblio::Metadata
=> SUCCESS: They all use the schema attribute when they used to use
marcflavour
- Run all the modified tests and scripts
=> SUCCESS: We are all good
- Sign off :-D

Note: while this seems like a minor change, the places in which plain
SQL is used really require understanding the queries and how they are
used, because some query results might be passed to some other method
that in turn uses the marcflavour attribute. I of course took that into
account but errare humanum est :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/Biblio.pm
C4/Items.pm
misc/cronjobs/delete_records_via_leader.pl
misc/maintenance/sanitize_records.pl
misc/migration_tools/build_oai_sets.pl
misc/migration_tools/switch_marc21_series_info.pl
t/db_dependent/Exporter/Record.t
t/db_dependent/OAI/Server.t