diff --git a/api/migrations/20210315213010-createOutcomeDescriptionSubset.js b/api/migrations/20210315213010-createOutcomeDescriptionSubset.js index cb2b17f7d..c9f5670d0 100644 --- a/api/migrations/20210315213010-createOutcomeDescriptionSubset.js +++ b/api/migrations/20210315213010-createOutcomeDescriptionSubset.js @@ -37,11 +37,9 @@ exports.up = async function(db) { } ); - - const nrptiCollection = mClient.collection('nrpti'); - nrptiCollection.dropIndex('keyword-search-text-index'); + await nrptiCollection.dropIndex('keyword-search-text-index'); await nrptiCollection.createIndex( { @@ -64,7 +62,7 @@ exports.up = async function(db) { const redactedCollection = mClient.collection('redacted_record_subset'); - redactedCollection.dropIndex('keyword-search-text-index'); + await redactedCollection.dropIndex('keyword-search-text-index'); await redactedCollection.createIndex( {