mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-03 19:36:20 +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];
 | 
					                        const connection = strapi.config.connections[definition.connection];
 | 
				
			||||||
                        let columns = Object.keys(attributes).filter(attribute => ['string', 'text'].includes(attributes[attribute].type));
 | 
					                        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
 | 
					                          // No text columns founds, exit from creating Fulltext Index
 | 
				
			||||||
                          return;
 | 
					                          return;
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 | 
				
			|||||||
@ -5,6 +5,7 @@ const inquirer = require('inquirer');
 | 
				
			|||||||
const rimraf = require('rimraf');
 | 
					const rimraf = require('rimraf');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module.exports = (scope, success, error) => {
 | 
					module.exports = (scope, success, error) => {
 | 
				
			||||||
 | 
					  // eslint-disable-next-line import/no-unresolved
 | 
				
			||||||
  const knex = require('knex')({
 | 
					  const knex = require('knex')({
 | 
				
			||||||
    client: scope.client.module,
 | 
					    client: scope.client.module,
 | 
				
			||||||
    connection: Object.assign({}, scope.database.settings, {
 | 
					    connection: Object.assign({}, scope.database.settings, {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user