diff --git a/lib/dialects/mysql/schema/mysql-compiler.js b/lib/dialects/mysql/schema/mysql-compiler.js index 9330e4795f..7b84bacdbf 100644 --- a/lib/dialects/mysql/schema/mysql-compiler.js +++ b/lib/dialects/mysql/schema/mysql-compiler.js @@ -48,8 +48,8 @@ class SchemaCompiler_MySQL extends SchemaCompiler { output(resp) { return resp.some((row) => { return ( - this.client.wrapIdentifier(row.Field) === - this.client.wrapIdentifier(column) + this.client.wrapIdentifier(row.Field.toLowerCase()) === + this.client.wrapIdentifier(column.toLowerCase()) ); }); }, diff --git a/test/integration2/schema/misc.spec.js b/test/integration2/schema/misc.spec.js index 3f663eab35..3f754faa29 100644 --- a/test/integration2/schema/misc.spec.js +++ b/test/integration2/schema/misc.spec.js @@ -1661,9 +1661,9 @@ describe('Schema (misc)', () => { expect(exists).to.equal(true); })); - describe('sqlite only', () => { + describe('sqlite and mysql only', () => { it('checks whether a column exists without being case sensitive, resolving with a boolean', async function () { - if (!isSQLite(knex)) { + if (!isSQLite(knex)&& !isMysql(knex)) { return this.skip(); }