If we are thinking of supporting other metadata schemas, the 'marcflavour' field should be renamed 'schema'. This is what the Koha::MetadataRecord class does already.
I totally agree.
Created attachment 84175 [details] [review] Bug 22155: DB update
Created attachment 84176 [details] [review] Bug 22155: DB update
Created attachment 84177 [details] [review] 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
Created attachment 84182 [details] [review] Bug 22155: DB update
Created attachment 84183 [details] [review] 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
Created attachment 84200 [details] [review] Bug 22155: DB update Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 84201 [details] [review] 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>
Created attachment 84244 [details] [review] Bug 22155: DB update Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 84245 [details] [review] 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>
Awesome work all! Pushed to master for 19.05
(In reply to Nick Clemens from comment #11) > Awesome work all! > > Pushed to master for 19.05 Nick is a champion :3.
Enhancement, will not be backported at this time to 18.11.x series.