lib/adapters/mysql.js
function (tableName, index) {
            var indexName = this.__quoteIdentifier(index.name || this.__defaultIndexName(tableName,
                index.columns)), t = index.type, using = "";
            var indexType = "";
            if (t === "fullText") {
                indexType = "FULLTEXT ";
            } else if (t === "spatial") {
                indexType = "SPATIAL ";
            } else {
                indexType = index.unique ? "UNIQUE " : "";
                using = t ? " USING " + t : "";
            }
            return format("CREATE %sINDEX %s%s ON %s %s", indexType, indexName, using,
                this.__quoteSchemaTable(tableName), this.literal(index.columns.map(function (c) {
                    return isString(c) ? sql.identifier(c) : c;
                })));
        }
function (tableName, index) {
            var indexName = this.__quoteIdentifier(index.name || this.__defaultIndexName(tableName,
                index.columns)), t = index.type, using = "";
            var indexType = "";
            if (t === "fullText") {
                indexType = "FULLTEXT ";
            } else if (t === "spatial") {
                indexType = "SPATIAL ";
            } else {
                indexType = index.unique ? "UNIQUE " : "";
                using = t ? " USING " + t : "";
            }
            return format("CREATE %sINDEX %s%s ON %s %s", indexType, indexName, using,
                this.__quoteSchemaTable(tableName), this.literal(index.columns.map(function (c) {
                    return isString(c) ? sql.identifier(c) : c;
                })));
        }
function ( tableName , index ) { var indexName = this . __quoteIdentifier ( index . name || this . __defaultIndexName ( tableName , index . columns ) ) , t = index . type , using = "" ; var indexType = "" ; if ( t === "fullText" ) { indexType = "FULLTEXT " ; } else if ( t === "spatial" ) { indexType = "SPATIAL " ; } else { indexType = index . unique ? "UNIQUE " : "" ; using = t ? " USING " + t : "" ; } return format ( "CREATE %sINDEX %s%s ON %s %s" , indexType , indexName , using , this . __quoteSchemaTable ( tableName ) , this . literal ( index . columns . map ( function ( c ) { return isString ( c ) ? sql . identifier ( c ) : c ; } ) ) ) ; }
Handle MySQL specific index SQL syntax
Handle MySQL specific index SQL syntax