From 4eebae368703867c80eb008f5d93f04fa0503c65 Mon Sep 17 00:00:00 2001 From: Fabien LAVILLE Date: Tue, 20 Jul 2021 14:19:43 +0200 Subject: [PATCH 1/2] Add handling of indexes with type FULLTEXT --- lib/migrate.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/migrate.js b/lib/migrate.js index 3cc5fb9..72c711b 100644 --- a/lib/migrate.js +++ b/lib/migrate.js @@ -154,6 +154,8 @@ const parseIndex = function(idx) // @todo: UNIQUE|FULLTEXT|SPATIAL if (idx.unique) options.type = options.indicesType = 'UNIQUE'; + else (idx.type) + options.type = options.indicesType = idx.type; if (idx.method) options.indexType = idx.type; // Set a type for the index, e.g. BTREE. See the documentation of the used dialect From e3ab06d856262134efe0bad8f92776e252a4fd05 Mon Sep 17 00:00:00 2001 From: Fabien LAVILLE Date: Tue, 20 Jul 2021 14:32:26 +0200 Subject: [PATCH 2/2] Handle indexes "type" options. For example for FULLTEXT indexes --- README.md | 7 +++++++ lib/migrate.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7110024..23087bb 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ +# List of changes from Scimonster fork +- Indexes + - Handle "type" option = 'UNIQUE|FULLTEXT|SPATIAL' + + + + # sequelize-auto-migrations Migration generator && runner for sequelize diff --git a/lib/migrate.js b/lib/migrate.js index 72c711b..8b41eae 100644 --- a/lib/migrate.js +++ b/lib/migrate.js @@ -154,7 +154,7 @@ const parseIndex = function(idx) // @todo: UNIQUE|FULLTEXT|SPATIAL if (idx.unique) options.type = options.indicesType = 'UNIQUE'; - else (idx.type) + else if (idx.type) options.type = options.indicesType = idx.type; if (idx.method)