Commit a5282d74 authored by Robert Lyon's avatar Robert Lyon
Browse files

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>
(cherry picked from commit b737ffe8)
(cherry picked from commit a4113329)
parent f7d1bdba
......@@ -4982,6 +4982,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