Commit b737ffe8 authored by Robert Lyon's avatar Robert Lyon

Bug 1720912: Drop triggers correctly with drop_elasticsearch_triggers()

behatnotneeded

Change-Id: I439d1161e2d3ae12920ae24bba8af47c62a7ce07
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 635ff51a
......@@ -5184,6 +5184,10 @@ function drop_elasticsearch_triggers() {
if (get_config('searchplugin') == 'elasticsearch') {
log_debug('Dropping elasticsearch triggers');
require_once(get_config('docroot') . 'search/elasticsearch/lib.php');
$enabledtypes = explode(',', get_config_plugin('search', 'elasticsearch', 'types'));
foreach ($enabledtypes as $type) {
ElasticsearchIndexing::drop_triggers($type);
}
ElasticsearchIndexing::drop_trigger_functions();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment