From 178fecfa5f02b601ef91e4e0228b41a78521053b Mon Sep 17 00:00:00 2001 From: Michael Kohler Date: Thu, 24 Dec 2020 01:17:20 +0100 Subject: [PATCH] fix: add index for Sentence's localeId --- .../20202024011426-add-sentence-localeId-index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 server/migrations/20202024011426-add-sentence-localeId-index.js diff --git a/server/migrations/20202024011426-add-sentence-localeId-index.js b/server/migrations/20202024011426-add-sentence-localeId-index.js new file mode 100644 index 00000000..d46bc134 --- /dev/null +++ b/server/migrations/20202024011426-add-sentence-localeId-index.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = { + up: (queryInterface) => queryInterface.addIndex( + 'Sentences', + ['localeId'], + { + indexName: 'SentenceLocaleIndex', + indicesType: 'FULLTEXT', + } + ), + down: (queryInterface) => queryInterface.removeIndex('Sentences', 'SentenceLocaleIndex'), +};