deliverr / data-knex-snowflake-dialect

knex.js dialect for the Snowflake data warehouse
MIT License
13 stars 26 forks source link

File name upgrades from Knex v0.95 and unique index in mysql compiler #17

Open rachet-khanal opened 3 years ago

rachet-khanal commented 3 years ago

There are changes in the recent upgrade of v0.95 which now changes the names of files such as dialects/mysql/schema/tablecompiler into dialects/mysql/schema/mysql-tablecompiler.js.

Also unique() function builds query statement with {indexname}(columns) which needs a function similar to index and dropIndex in TableCompiler something like below to remove indexing?

unique(columns, indexName) { this.pushQuery( alter table ${this.tableName()} add unique (${this.formatter.columnize( columns )}) ); } ;