From 1403dff135554ab865f3a50d6a439ab89912d713 Mon Sep 17 00:00:00 2001 From: Anton Avramov Date: Sat, 20 Jul 2019 16:53:55 -0400 Subject: [PATCH] Do not index TEXT --- lib/guess-model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/guess-model.js b/lib/guess-model.js index 923e0af..6aa9a9e 100644 --- a/lib/guess-model.js +++ b/lib/guess-model.js @@ -68,7 +68,7 @@ function guessModel(data, tablesOptions = {}, sequlizeInstance) { fields[fieldName] = field; // Make indexes based on column name - if (shouldIndex(columnName, tablesOptions)) { + if (shouldIndex(columnName, tablesOptions) && field.type != 'TEXT') { // Index needs to use SQL name, not Sequelize name modelOptions.indexes.push({ fields: [sqlName] }); }