Bug 19821: Install sample data, ES mappings and Version syspref
Also move .proverc to .proverc.dist, so it cannot be used by accident. Different ways to use it: 1/ prove --rc .proverc.dist Use defaults 2/ cp .proverc.dist .proverc && prove Allows to configure db name, marcflavour, and prove options Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
a78c4b45e4
commit
d33552f871
3 changed files with 6 additions and 2 deletions
1
.proverc
1
.proverc
|
@ -1 +0,0 @@
|
|||
-Mt::lib::Bootstrap=database,koha_test
|
1
.proverc.dist
Normal file
1
.proverc.dist
Normal file
|
@ -0,0 +1 @@
|
|||
-Mt::lib::Bootstrap=database,koha_test,marcflavour,MARC21
|
|
@ -60,14 +60,18 @@ sub import {
|
|||
$installer->load_db_schema();
|
||||
$installer->set_marcflavour_syspref($args{marcflavour});
|
||||
my (undef, $fwklist) = $installer->marc_framework_sql_list('en', $args{marcflavour});
|
||||
my (undef, $list) = $installer->sample_data_sql_list('en');
|
||||
my @frameworks;
|
||||
foreach my $fwk (@$fwklist) {
|
||||
foreach my $fwk (@$fwklist, @$list) {
|
||||
foreach my $framework (@{ $fwk->{frameworks} }) {
|
||||
push @frameworks, $framework->{fwkfile};
|
||||
}
|
||||
}
|
||||
my $all_languages = C4::Languages::getAllLanguages();
|
||||
$installer->load_sql_in_order($all_languages, @frameworks);
|
||||
require Koha::SearchEngine::Elasticsearch;
|
||||
Koha::SearchEngine::Elasticsearch->reset_elasticsearch_mappings;
|
||||
$installer->set_version_syspref();
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Reference in a new issue