Bug 21087: (QA follow-up) Fix usage in create_superlibrarian.pl
[srvgit] / misc / devel / populate_db.pl
index 26c6279..e419e37 100755 (executable)
@@ -24,7 +24,8 @@ use Pod::Usage;
 
 use C4::Installer;
 use C4::Context;
-use t::lib::Mocks;
+
+use Koha::SearchEngine::Elasticsearch;
 
 =head1 NAME
 
@@ -105,6 +106,7 @@ my @sample_files_mandatory = (
     "$data_dir/sysprefs.sql",
     "$data_dir/userflags.sql",
     "$data_dir/userpermissions.sql",
+    "$data_dir/account_offset_types.sql",
 );
 my @sample_lang_files_mandatory    = ( glob $root . "/installer/data/mysql/$lang/mandatory/*.sql" );
 my @sample_lang_files_optional     = ( glob $root . "/installer/data/mysql/$lang/optional/*.sql" );
@@ -161,6 +163,9 @@ sub initialize_data {
         INSERT INTO systempreferences(variable, value, options, explanation, type)
         VALUES ('Version', '$version', NULL, 'The Koha database version. WARNING: Do not change this value manually, it is maintained by the webinstaller', NULL)
     });
+
+    # Initialize ES mappings
+    Koha::SearchEngine::Elasticsearch->reset_elasticsearch_mappings;
 }
 
 sub execute_sqlfile {