mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Fix validation for avoid create invalid indexes
Fix the validation introduced with #1950 Fix #1382 Add skip eslint rule to avoid error
This commit is contained in:
parent
8e7146c62b
commit
2fcab8f9d1
@ -461,7 +461,7 @@ module.exports = function(strapi) {
|
||||
const connection = strapi.config.connections[definition.connection];
|
||||
let columns = Object.keys(attributes).filter(attribute => ['string', 'text'].includes(attributes[attribute].type));
|
||||
|
||||
if (!columns) {
|
||||
if (!columns.length) {
|
||||
// No text columns founds, exit from creating Fulltext Index
|
||||
return;
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ const inquirer = require('inquirer');
|
||||
const rimraf = require('rimraf');
|
||||
|
||||
module.exports = (scope, success, error) => {
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
const knex = require('knex')({
|
||||
client: scope.client.module,
|
||||
connection: Object.assign({}, scope.database.settings, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user