UNPKG

knex

Version:

A batteries-included SQL query & schema builder for PostgresSQL, MySQL, CockroachDB, MSSQL and SQLite3

1,044 lines (672 loc) 128 kB
# Master (Unreleased) # 3.2.9 - 3 April, 2026 ### Bug fixes - fix: support DELETE... LIMIT in dialects that support it (mysql), but continue to disallow ones that don't [#6429](https://github.com/knex/knex/issues/6429) - fix(postgres): escape double quotes in searchPath to prevent SQL injection [#6411](https://github.com/knex/knex/issues/6411) - fix(sqlite): append RETURNING statement when insert empty row [#5471](https://github.com/knex/knex/issues/5471) - fix: add type support for Array<Buffer> [#6428](https://github.com/knex/knex/issues/6428) # 3.2.8 - 30 March, 2026 ### Bug fixes - Reverts the breaking changes added in [#6227](https://github.com/knex/knex/issues/6227). This means that the ESM import of Knex is reverted to `import { knex } from 'knex/knex.mjs` [#6422](https://github.com/knex/knex/issues/6422) - fix(types): allow a `QueryBuilder` type as a value in an `update` [#6419](https://github.com/knex/knex/issues/6419) # 3.2.7 - 27 March, 2026 ### Bug fixes - fix sqlite DDL operations failing inside transactions [#6408](https://github.com/knex/knex/issues/6408) - fix: handle lowercase INFORMATION_SCHEMA keys in MySQL renameColumn [#6407](https://github.com/knex/knex/issues/6407) - fix: clone config in client constructor [#5633](https://github.com/knex/knex/issues/5633) - fix: remove \_\_knexTxId from transaction connection on release [#5288](https://github.com/knex/knex/issues/5288) - fix: correct binding order in delete with subquery join [#6412](https://github.com/knex/knex/issues/6412) - chore: omit ./scripts from published package [#6356](https://github.com/knex/knex/issues/6356) # 3.2.6 - 24 March, 2026 ### Bug fixes - Fix module exports [#6406](https://github.com/knex/knex/issues/6406) # 3.2.5 - 23 March, 2026 ### Bug fixes - Fix ESM exports [#6405](https://github.com/knex/knex/issues/6405) # 3.2.4 - 23 March, 2026 ### Bug fixes - Fix ESM type exports [#6404](https://github.com/knex/knex/issues/6404) # 3.2.1 - 22 March, 2026 ### Bug fixes - Fix subpath imports broken by exports field added in 3.2.0. Packages relying on deep imports (e.g. `knex/lib/dialects/sqlite3/index`) were blocked by the restrictive exports map ### Docs - Add VitePress blog with archive and UTC post dates ([#6397](https://github.com/knex/knex/issues/6397)) # 3.2.0 - 22 March, 2026 ### New features - Add migration lifecycle hooks ([#5541](https://github.com/knex/knex/issues/5541)) - Add SIMILAR TO operator ([#5303](https://github.com/knex/knex/issues/5303)) - Add dropUniqueIfExists ([#6069](https://github.com/knex/knex/issues/6069)) - Add 'validate' pool option ([#5120](https://github.com/knex/knex/issues/5120)) - PostgreSQL: default datetime/timestamp precision setting added ([#5311](https://github.com/knex/knex/issues/5311)) - Better-SQLite3: Support defaultSafeIntegers option ([#6320](https://github.com/knex/knex/issues/6320)) - Better-SQLite3: Improve safeIntegers support ([#6352](https://github.com/knex/knex/issues/6352)) - SQLite: Refactor transactions to allow setting the foreign_keys pragma for a transaction ([#6315](https://github.com/knex/knex/issues/6315)) ### Bug fixes - Fix where in query with raw column ([#6323](https://github.com/knex/knex/issues/6323)) - Fix migrate up with completed migration ([#6342](https://github.com/knex/knex/issues/6342)) - Fix ESM export and typings ([#6227](https://github.com/knex/knex/issues/6227)) - Fix migration CLI and cli tests ([#6264](https://github.com/knex/knex/issues/6264)) - Fix recover from broken connection ([#5774](https://github.com/knex/knex/issues/5774)) - Prevent unexpected combinations of statements and clauses groups from executing ([#6314](https://github.com/knex/knex/issues/6314)) - Improve CLI error reporting in some edge cases ([#6265](https://github.com/knex/knex/issues/6265)) - PostgreSQL: clearer error when pg-query-stream is missing ([#6362](https://github.com/knex/knex/issues/6362)) - PostgreSQL: Fix streaming compatibility with pg-query-stream 4.14+ ([#6396](https://github.com/knex/knex/issues/6396)) - MySQL: Fix the operator "<=>" is not permitted ([#6158](https://github.com/knex/knex/issues/6158)) - MSSQL: Optimize stream.write ([#5693](https://github.com/knex/knex/issues/5693)) - SQLite: Fix whereILike issue ([#5687](https://github.com/knex/knex/issues/5687)) ### Types - Fix usage of `object` type that is too broad ([#5373](https://github.com/knex/knex/issues/5373)) - Fix pluck typing issue when CompositeTableType is used ([#4609](https://github.com/knex/knex/issues/4609)) - Make types no longer allow knex to be called without tablename ([#6188](https://github.com/knex/knex/issues/6188)) - Add missing type definition for orderBy with a raw column/expression ([#5803](https://github.com/knex/knex/issues/5803)) - Add additional typing for column.index ([#5371](https://github.com/knex/knex/issues/5371)) - Update typings for increment/decrement ([#5674](https://github.com/knex/knex/issues/5674)) - Use syntax `import from` instead of `import = require()` ([#5258](https://github.com/knex/knex/issues/5258)) - Import knex as type in TS seed template ([#6094](https://github.com/knex/knex/issues/6094)) - Update index.d.ts ([#5767](https://github.com/knex/knex/issues/5767)) - Add @types/minimatch v5 to fix TypeScript build ([#6240](https://github.com/knex/knex/issues/6240)) ### Tests - Additional tests for JSON (de)serialization ([#4451](https://github.com/knex/knex/issues/4451)) - Run CI on Node 22 and remove dtslint ([#6165](https://github.com/knex/knex/issues/6165)) ### Chore - Update to non-screamy versions of dependencies that have npm audit failures ([#6324](https://github.com/knex/knex/issues/6324)) - Upgrade pg to ^8.20.0, pg-query-stream to ^4.14.0 ([#6396](https://github.com/knex/knex/issues/6396)) # 3.1.0 - 8 December, 2023 ### Bug fixes - andWhereNotJsonObject calling wrong function ([#5683](https://github.com/knex/knex/issues/5683)) - PostgreSQL: fix error when setting query_timeout ([#5673](https://github.com/knex/knex/issues/5673)) - MySQL: Missing comments on delete, update and insert ([#5738](https://github.com/knex/knex/issues/5738)) - MySQL: Fixed issue with bigincrements not working with composite primary key - [#5341](https://github.com/knex/knex/issues/5341) ([#5343](https://github.com/knex/knex/issues/5343)) ### Types - Add type definitions for orHavingNull and orHavingNotNull ([#5669](https://github.com/knex/knex/issues/5669)) - Import knex as type in TS migration template ([#5741](https://github.com/knex/knex/issues/5741)) - Fix conditional constraint error ([#5747](https://github.com/knex/knex/issues/5747)) - PostgreSQL: Fix typing to reflect pg typing change ([#5647](https://github.com/knex/knex/issues/5647)) ### New features - Add transactor.parentTransaction ([#5567](https://github.com/knex/knex/issues/5567)) - MySQL: Added implementation for upsert ([#5743](https://github.com/knex/knex/issues/5743)) - Oracle: Support Object Names Greater than 30 Characters for Oracle DB Versions 12.2 and Greater ([#5197](https://github.com/knex/knex/issues/5197)) # 3.0.1 - 6 October, 2023 - Build fix # 3.0.0 - 6 October, 2023 - Fix raw bindings typing ([#5401](https://github.com/knex/knex/issues/5401)) - Fix migrate:unlock when used with custom identifier wrapping. ([#5353](https://github.com/knex/knex/issues/5353)) - Fix driver options specified with .options() method being ignored for oracledb dialect ([#5123](https://github.com/knex/knex/issues/5123)) - Drop compatibility for Node < 16 - Fix knex d.ts to work with mixed modules ([#5659](https://github.com/knex/knex/issues/5659)) - Fix Lexical error from "Instaed" to "Instead" ([#5655](https://github.com/knex/knex/issues/5655)) ### Bug fixes - Fix Linting [#5455](https://github.com/knex/knex/issues/5455) - [#5460](https://github.com/knex/knex/issues/5460) # 2.5.1 - 12 July, 2023 ### Bug fixes - Fix Linting [#5455](https://github.com/knex/knex/issues/5455) - [#5460](https://github.com/knex/knex/issues/5460) # 2.5.0 - 08 July, 2023 ### New features - Add uuid helper function ([#5617](https://github.com/knex/knex/issues/5617)) - Add `nativeBindings` option to `better-sqlite3` options ([#5461](https://github.com/knex/knex/issues/5461)) - Add QueryBuilder#updateFrom ([#5386](https://github.com/knex/knex/issues/5386)) - Add readonly transaction access mode ([#5445](https://github.com/knex/knex/issues/5445)) - Add readonly option to Better-SQLite3 ([#5530](https://github.com/knex/knex/issues/5530)) - Add EXCEPT as a valid keyword ([#5357](https://github.com/knex/knex/issues/5357)) - Add ability to prepend query comments ([#5289](https://github.com/knex/knex/issues/5289)) - Add fetchAsString option ([#5484](https://github.com/knex/knex/issues/5484)) ### Bug fixes - Avoid password leaks on query logs ([#5559](https://github.com/knex/knex/issues/5559)) - Add knex.mjs to files in package.json ([#5518](https://github.com/knex/knex/issues/5518)) - Handle numeric array elements in .orderBy() ([#5551](https://github.com/knex/knex/issues/5551)) - Attach error handler early enough ([#5552](https://github.com/knex/knex/issues/5552)) - Fix Returning \* in Oracle ([#5598](https://github.com/knex/knex/issues/5598)) - Fix indexType option in `Postgres` ([#5601](https://github.com/knex/knex/issues/5601)) - Add mjs extension type ([#5616](https://github.com/knex/knex/issues/5616)) - Use implicit check on json fields for OracleDB ([#5478](https://github.com/knex/knex/issues/5478)) - Fix when manually close source stream ([#5466](https://github.com/knex/knex/issues/5466)) - Fix case sensitive issue with get table ([#5509](https://github.com/knex/knex/issues/5509)) ### Typings - Add Object syntax overload to increment method ([#5512](https://github.com/knex/knex/issues/5512)) - Add object syntax overload to decrement method ([#5555](https://github.com/knex/knex/issues/5555)) - Fix typing for toSql ([#5594](https://github.com/knex/knex/issues/5594)) - Add ResolveTableType for `.merge()` ([#5605](https://github.com/knex/knex/issues/5605)) - Add missing types for havingNull and havingNotNull ([#5529](https://github.com/knex/knex/issues/5529)) - Add collate to the columnbuilder interface ([#5568](https://github.com/knex/knex/issues/5568)) - TableBuilder methods return the SchemaBuilder. ([#5486](https://github.com/knex/knex/issues/5486)) # 2.4.2 - 22 January, 2023 ### Bug fixes - CLI: Fix incorrent EOL causing errors on Linux [#5455](https://github.com/knex/knex/issues/5455) # 2.4.1 - 18 January, 2023 ### Bug fixes - PostgreSQL: Fix Malformed array literal 2.4.0 Regression [#5439](https://github.com/knex/knex/issues/5439) # 2.4.0 - 06 January, 2023 ### New features: - Support partial unique indexes [#5316](https://github.com/knex/knex/issues/5316) - Make compiling SQL in error message optional [#5282](https://github.com/knex/knex/issues/5282) ### Bug fixes - Insert array into json column [#5321](https://github.com/knex/knex/issues/5321) - Fix unexpected max acquire-timeout [#5377](https://github.com/knex/knex/issues/5377) - Fix: orWhereJson [#5361](https://github.com/knex/knex/issues/5361) - MySQL: Add assertion for basic where clause not to be object or array [#1227](https://github.com/knex/knex/issues/1227) - SQLite: Fix changing the default value of a boolean column in SQLite [#5319](https://github.com/knex/knex/issues/5319) ### Typings: - add missing type for 'expirationChecker' on PgConnectionConfig [#5334](https://github.com/knex/knex/issues/5334) # 2.3.0 - 31 August, 2022 ### New features: - PostgreSQL: Explicit jsonb support for custom pg clients [#5201](https://github.com/knex/knex/issues/5201) - SQLite: Support returning with sqlite3 and better-sqlite3 [#5285](https://github.com/knex/knex/issues/5285) - MSSQL: Implement mapBinding mssql dialect option [#5292](https://github.com/knex/knex/issues/5292) ### Typings: - Update types for TS 4.8 [#5279](https://github.com/knex/knex/issues/5279) - Fix typo [#5267](https://github.com/knex/knex/issues/5267) - Fix WhereJsonObject withCompositeTableType [#5306](https://github.com/knex/knex/issues/5306) - Fix AnalyticFunction type [#5304](https://github.com/knex/knex/issues/5304) - Infer specific column value type in aggregations [#5297](https://github.com/knex/knex/issues/5297) # 2.2.0 - 19 July, 2022 ### New features: - Inline primary key creation for postgres flavours [#5233](https://github.com/knex/knex/issues/5233) - SQLite: Add warning for undefined connection file [#5223](https://github.com/knex/knex/issues/5223) - MSSQL: Add JSON parameter support for connection [#5200](https://github.com/knex/knex/issues/5200) ### Bug fixes: - PostgreSQL: add primaryKey option for uuid [#5212](https://github.com/knex/knex/issues/5212) ### Typings: - Add promisable and better types [#5222](https://github.com/knex/knex/issues/5222) - Update raw query bind parameter type [#5208](https://github.com/knex/knex/issues/5208) # 2.1.0 - 26 May, 2022 ### New features: - Improve bundling experience to safely import dialects while using static paths [#5142](https://github.com/knex/knex/issues/5142) - Implement extendable builders [#5041](https://github.com/knex/knex/issues/5041) - PostgreSQL: Refresh materialized view concurrently [#5166](https://github.com/knex/knex/issues/5166) ### Bug fixes: - Use correct paths in package.json browser field [#5174](https://github.com/knex/knex/issues/5174) - MariaDB: Fix 'NULL' returned instead of NULL on MariaDB 10.2.6+ [#5181](https://github.com/knex/knex/issues/5181) - MySQL: fix hasColumn Error (hasColumn ('a_id') is true, but hasColumn('a_Id') is false) [#5148](https://github.com/knex/knex/issues/5148) - MSSQL: Fix .hasTable result when using .withSchema [#5176](https://github.com/knex/knex/issues/5176) - Oracle: correctly INSERTS Buffer [#4869](https://github.com/knex/knex/issues/4869) ### Typings: - Update type definitions for pg connection [#5139](https://github.com/knex/knex/issues/5139) # 2.0.0 - 21 April, 2022 ### Breaking changes - Restore sqlite3 package [#5136](https://github.com/knex/knex/issues/5136) ### Test / internal changes: - Migrate Husky from 4 to 7 [#5137](https://github.com/knex/knex/issues/5137) - Migrate Jake to 10.8.5 [#5138](https://github.com/knex/knex/issues/5138) # 1.0.7 - 13 April, 2022 ### Bug fixes: - CLI: Fix cli migrate:make SQLite dependency [#5106](https://github.com/knex/knex/issues/5106) # 1.0.6 - 12 April, 2022 ### Bug fixes: - PostgreSQL: Wait for search path to be set before returning connection [#5107](https://github.com/knex/knex/issues/5107) - CLI: No client override during migrate:make [#5109](https://github.com/knex/knex/issues/5109) # 1.0.5 - 05 April, 2022 ### New features: - Override knexfile options with CLI options [#4047](https://github.com/knex/knex/issues/4047) ### Bug fixes: - Stringify json value in update [#5063](https://github.com/knex/knex/issues/5063) - Fix isModuleType() for yarn [#4447](https://github.com/knex/knex/issues/4447) - Wrapped Unions Fixes [#5072](https://github.com/knex/knex/issues/5072) - SQLite: Fix @vscode-sqlite3 error message [#5081](https://github.com/knex/knex/issues/5081) - CLI: Fix completed migration listing [#5060](https://github.com/knex/knex/issues/5060) ### Typings: - Make default generic parameters of `Knex` match the generic parameter types of `knex` [#5021](https://github.com/knex/knex/issues/5021) - Update knex types for TS 4.7 [#5095](https://github.com/knex/knex/issues/5095) # 1.0.4 - 13 March, 2022 ### New features: - Add whereLike functions [#5044](https://github.com/knex/knex/issues/5044) ### Bug fixes: - Fix orWhereJsonPath clause [#5022](https://github.com/knex/knex/issues/5022) - Subquery in on clause missing parenthesis [#5049](https://github.com/knex/knex/issues/5049) - Rework Union Wrapping [#5030](https://github.com/knex/knex/issues/5030) - Oracle: Fix batch inserts with DEFAULT values with OracleDB [#2592](https://github.com/knex/knex/issues/2592) [#5037](https://github.com/knex/knex/issues/5037) ### Typings: - Fix types for "returning" methods [#5031](https://github.com/knex/knex/issues/5031) - createTableLike callback should be optional [#5055](https://github.com/knex/knex/issues/5055) ### Documentation: - Website URL changed to https://knex.github.io/documentation/ # 1.0.3 - 11 February, 2022 ### Bug fixes: - Fix error message for missing migration files [#4937](https://github.com/knex/knex/issues/4937) - Add withMaterialized and withNotMaterialized to method-constants [#5009](https://github.com/knex/knex/issues/5009) - PostgreSQL: Fix whereJsonPath queries [#5011](https://github.com/knex/knex/issues/5011) - PostgreSQL: Fix delete joins [#5016](https://github.com/knex/knex/issues/5016) - CockroachDB: Fix whereJsonPath queries [#5011](https://github.com/knex/knex/issues/5011) - MySQL: Create primary keys in same statement [#5017](https://github.com/knex/knex/issues/5017) ### Typings: - Fix type definition for getMigration in MigrationSource [#4998](https://github.com/knex/knex/issues/4998) - Fix argument type of alter method [#4996](https://github.com/knex/knex/issues/4996) ### Improvements: - Use async / await syntax in seeds as default [#5005](https://github.com/knex/knex/issues/5005) ### Documentation: - Add Firebird dialect to ECOSYSTEM.md [#5003](https://github.com/knex/knex/issues/5003) # 1.0.2 - 02 February, 2022 ### New features: - Support of MATERIALIZED and NOT MATERIALIZED with WITH/CTE [#4940](https://github.com/knex/knex/issues/4940) - Add raw support in onConflict clause [#4960](https://github.com/knex/knex/issues/4960) - Alter nullable constraint when alterNullable is set to true [#4730](https://github.com/knex/knex/issues/4730) - Add alterType parameter for alter function [#4967](https://github.com/knex/knex/issues/4967) - Support string json in json values [#4988](https://github.com/knex/knex/issues/4988) - MySQL: add with clause [#4508](https://github.com/knex/knex/issues/4508) ### Bug fixes: - Fix error message for missing migration files [#4937](https://github.com/knex/knex/issues/4937) - Move deferrable to after on update/on delete [#4976](https://github.com/knex/knex/issues/4976) - Do not use sys.tables to find if a table exists [#2328](https://github.com/knex/knex/issues/2328) - PostgreSQL: Fix Order nulls [#4989](https://github.com/knex/knex/issues/4989) - MySQL: Fix collation when renaming column [#2666](https://github.com/knex/knex/issues/2666) - SQLite: Same boolean handling in better-sqlite3 as in sqlite3 [#4982](https://github.com/knex/knex/issues/4982) ### Typings: - WhereILike - fix typo [#4941](https://github.com/knex/knex/issues/4941) # 1.0.1 - 16 January, 2022 ### Bug fixes: - Fix package.json metadata # 1.0.0 - 16 January, 2022 ### Breaking changes - Dropped support for Node 10; - Replaced unsupported `sqlite3` driver with `@vscode/sqlite3`; - Changed data structure from `RETURNING` operation to be consistent with `SELECT`; - Changed Migrator to return list of migrations as objects consistently. ### New features: - Support fromRaw [#4781](https://github.com/knex/knex/issues/4781) - Support zero precision in timestamp/datetime [#4784](https://github.com/knex/knex/issues/4784) - Support whereLike and whereILike [#4779](https://github.com/knex/knex/issues/4779) - Add JSDoc (TS flavor) to stub files [#4809](https://github.com/knex/knex/issues/4809) - Allow skip binding in limit and offset [#4811](https://github.com/knex/knex/issues/4811) - Support creating a new table in the database based on another table [#4821](https://github.com/knex/knex/issues/4821) - Accept Raw on onIn joins [#4830](https://github.com/knex/knex/issues/4830) - Implement support for custom seed sources [#4842](https://github.com/knex/knex/issues/4842) - Add binary uuid option [#4836](https://github.com/knex/knex/issues/4836) - ForUpdate array parameter [#4882](https://github.com/knex/knex/issues/4882) - Add camel case to timestamps method [#4803](https://github.com/knex/knex/issues/4803) - Advanced JSON support [#4859](https://github.com/knex/knex/issues/4859) - Add type to TypeScript knexfile [#4909](https://github.com/knex/knex/issues/4909) - Checks Constraints Support [#4874](https://github.com/knex/knex/issues/4874) - Support creating multiple PKs with increments [#4903](https://github.com/knex/knex/issues/4903) - Enable wrapIdentifier for SQLite .hasTable [#4915](https://github.com/knex/knex/issues/4915) - MSSQL: Add support for unique constraint [#4887](https://github.com/knex/knex/issues/4887) - SQLite: New dialect, using better-sqlite3 driver [#4871](https://github.com/knex/knex/issues/4871) - SQLite: Switch to @vscode/sqlite3 [#4866](https://github.com/knex/knex/issues/4866) - SQLite: Support createViewOrReplace [#4856](https://github.com/knex/knex/issues/4856) - SQLite: Support RETURNING statements for better-sqlite3 driver [#4934](https://github.com/knex/knex/issues/4934) - PostgreSQL: Support JOIN and USING syntax for Delete Statement [#4800](https://github.com/knex/knex/issues/4800) ### Bug fixes: - Fix overzealous warning on use of whereNot with "in" or "between" [#4780](https://github.com/knex/knex/issues/4780) - Fix Union all + first syntax error [#4799](https://github.com/knex/knex/issues/4799) - Make view columns optional in create view like [#4829](https://github.com/knex/knex/issues/4829) - Insert lock row fix during migration [#4865](https://github.com/knex/knex/issues/4865) - Fix for createViewOrReplace [#4856](https://github.com/knex/knex/issues/4856) - SQLite: Fix foreign key constraints when altering a table [#4189](https://github.com/knex/knex/issues/4189) - MySQL: Validate connection fix [#4794](https://github.com/knex/knex/issues/4794) - MySQL: Set comment size warning limit to 1024 [#4867](https://github.com/knex/knex/issues/4867) ### Typings: - Allow string indexType in index creation [#4791](https://github.com/knex/knex/issues/4791) - Add missing ints typings [#4832](https://github.com/knex/knex/issues/4832) - Returning method types [#4881](https://github.com/knex/knex/issues/4881) - Improve columnInfo type [#4868](https://github.com/knex/knex/issues/4868) # 0.95.15 - 22 December, 2021 ### Bug fixes: - Oracle: - MariaDB: lock row fix during migration in MariaDB and Oracle [#4865](https://github.com/knex/knex/issues/4865) # 0.95.14 - 09 November, 2021 ### Bug fixes: - MySQL: mysql2 dialect validate connection fix [#4794](https://github.com/knex/knex/issues/4794) # 0.95.13 - 02 November, 2021 ### Bug fixes: - PostgreSQL: Support zero precision in timestamp/datetime [#4784](https://github.com/knex/knex/issues/4784) ### Typings: - Allow string indexType in index creation [#4791](https://github.com/knex/knex/issues/4791) # 0.95.12 - 28 October, 2021 ### New features: - New dialect: CockroachDB [#4742](https://github.com/knex/knex/issues/4742) - New dialect: pg-native [#4327](https://github.com/knex/knex/issues/4327) - CockroachDB: add support for upsert [#4767](https://github.com/knex/knex/issues/4767) - PostgreSQL: Support SELECT .. FOR NO KEY UPDATE / KEY SHARE row level locking clauses [#4755](https://github.com/knex/knex/issues/4755) - PostgreSQL: Add support for 'CASCADE' in PostgreSQL 'DROP SCHEMA' queries [#4713](https://github.com/knex/knex/issues/4713) - MySQL: Add storage engine index Type support to index() and unique() schema [#4756](https://github.com/knex/knex/issues/4756) - MSSQL: Support table.primary, table.unique variant with options object [#4710](https://github.com/knex/knex/issues/4710) - SQLite: Add setNullable support to SQLite [#4684](https://github.com/knex/knex/issues/4684) - Add geometry column building [#4776](https://github.com/knex/knex/issues/4776) - Add support for creating table copies [#1373](https://github.com/knex/knex/issues/1373) - Implement support for views and materialized views [#1626](https://github.com/knex/knex/issues/1626) - Implement partial index support [#4768](https://github.com/knex/knex/issues/4768) - Support for 'is null' in 'order by' [#3667](https://github.com/knex/knex/issues/3667) ### Bug fixes: - Fix support for Oracle connections passed via knex.connection() [#4757](https://github.com/knex/knex/issues/4757) - Avoid inserting multiple locks if a migration lock already exists [#4694](https://github.com/knex/knex/issues/4694) ### Typings: - Some TableBuilder methods return wrong types [#4764](https://github.com/knex/knex/issues/4764) - Update JoinRaw bindings type to accept arrays [#4752](https://github.com/knex/knex/issues/4752) - fix onDelete/onUpdate for ColumnBuilder [#4656](https://github.com/knex/knex/issues/4656) # 0.95.11 - 03 September, 2021 ### New features: - Add support for nullability modification via schema builder (table.setNullable() and table.dropNullable()) [#4657](https://github.com/knex/knex/issues/4657) - MySQL: Add support for mysql/mariadb-client JSON parameters in connectionURIs [#4629](https://github.com/knex/knex/issues/4629) - MSSQL: Support comments as MS_Description properties [#4632](https://github.com/knex/knex/issues/4632) ### Bug fixes: - Fix Analytic orderBy and partitionBy to follow the SQL documentation [#4602](https://github.com/knex/knex/issues/4602) - CLI: fix migrate:up for migrations disabling transactions [#4550](https://github.com/knex/knex/issues/4550) - SQLite: Fix adding a column with a foreign key constraint in SQLite [#4649](https://github.com/knex/knex/issues/4649) - MSSQL: columnInfo() support case-sensitive database collations [#4633](https://github.com/knex/knex/issues/4633) - MSSQL: Generate valid SQL for withRecursive() [#4514](https://github.com/knex/knex/issues/4514) - Oracle: withRecursive: omit invalid RECURSIVE keyword, include column list [#4514](https://github.com/knex/knex/issues/4514) ### Improvements: - Add .mjs migration and seed stubs [#4631](https://github.com/knex/knex/issues/4631) - SQLite: Clean up DDL handling and move all operations to the parser-based approach [#4648](https://github.com/knex/knex/issues/4648) # 0.95.10 - 20 August, 2021 ### Improvements: - Use sys info function instead of connection db name [#4623](https://github.com/knex/knex/issues/4623) ### Typings: - Deferrable and withkeyName should not be in ColumnBuilder [#4600](https://github.com/knex/knex/issues/4600) # 0.95.9 - 31 July, 2021 ### New features: - Oracle: support specifying schema for dropTable and dropSequence [#4596](https://github.com/knex/knex/issues/4596) - Oracle: support specifying schema for autoincrement [#4594](https://github.com/knex/knex/issues/4594) ### Typings: - Add TypeScript support for deferrable, new Primary/Unique syntax [#4589](https://github.com/knex/knex/issues/4589) # 0.95.8 - 25 July, 2021 ### New features: - Add deferrable support for constraint [#4584](https://github.com/knex/knex/issues/4584) - Implement delete with join [#4568](https://github.com/knex/knex/issues/4568) - Add DPI error codes for Oracle [#4536](https://github.com/knex/knex/issues/4536) ### Bug fixes: - Fixing PostgreSQL datetime and timestamp column created with wrong format [#4578](https://github.com/knex/knex/issues/4578) ### Typings: - Improve analytic types [#4576](https://github.com/knex/knex/issues/4576) - MSSQL: Add trustServerCertificate option [#4500](https://github.com/knex/knex/issues/4500) # 0.95.7 - 10 July, 2021 ### New features: - Add ability to omit columns on an onConflict().ignore() [#4557](https://github.com/knex/knex/issues/4557) - CLI: Log error message [#4534](https://github.com/knex/knex/issues/4534) ### Typings: - Export Knex.TransactionConfig [#4498](https://github.com/knex/knex/issues/4498) - Include options object in count(Distinct) typings [#4491](https://github.com/knex/knex/issues/4491) - Add types for analytic functions [#4544](https://github.com/knex/knex/issues/4544) # 0.95.6 - 17 May, 2021 ### Typings: - Export TransactionProvider type [#4489](https://github.com/knex/knex/issues/4489) # 0.95.5 - 11 May, 2021 ### New features: - SQLite: Add support for file open flags [#4446](https://github.com/knex/knex/issues/4446) - Add .cjs extension to Seeder.js to support Node ESM [#4381](https://github.com/knex/knex/issues/4381) [#4382](https://github.com/knex/knex/issues/4382) ### Bug fixes: - Remove peerDependencies to avoid auto-install on npm 7 [#4480](https://github.com/knex/knex/issues/4480) ### Typings: - Fix typing for increments and bigIncrements [#4406](https://github.com/knex/knex/issues/4406) - Add typings for on JoinClause for onVal [#4436](https://github.com/knex/knex/issues/4436) - Adding Type Definition for isTransaction [#4418](https://github.com/knex/knex/issues/4418) - Export client class from knex namespace [#4479](https://github.com/knex/knex/issues/4479) # 0.95.4 - 26 March, 2021 ### Typings: - Fix mistyping of stream [#4400](https://github.com/knex/knex/issues/4400) # 0.95.3 - 25 March, 2021 ### New features: - PostgreSQL: Add "same" as operator [#4372](https://github.com/knex/knex/issues/4372) - MSSQL: Improve an estimate of the max comment length [#4362](https://github.com/knex/knex/issues/4362) - Throw an error if negative offset is provided [#4361](https://github.com/knex/knex/issues/4361) ### Bug fixes: - Fix timeout method [#4324](https://github.com/knex/knex/issues/4324) - SQLite: prevent dropForeign from being silently ignored [#4376](https://github.com/knex/knex/issues/4376) ### Typings: - Allow config.client to be non-client instance [#4367](https://github.com/knex/knex/issues/4367) - Add dropForeign arg type for single column [#4363](https://github.com/knex/knex/issues/4363) - Update typings for TypePreservingAggregation and stream [#4377](https://github.com/knex/knex/issues/4377) # 0.95.2 - 11 March, 2021 ### New features: - Improve ESM import support [#4350](https://github.com/knex/knex/issues/4350) ### Bug fixes: - CLI: update ts.stub files to new TypeScript namespace [#4344](https://github.com/knex/knex/issues/4344) - CLI: fix TypeScript migration stub after 0.95.0 changes [#4366](https://github.com/knex/knex/issues/4366) ### Typings: - Move QueryBuilder and KnexTimeoutError into knex namespace [#4358](https://github.com/knex/knex/issues/4358) ### Test / internal changes: - Unify db test helpers [#4356](https://github.com/knex/knex/issues/4356) # 0.95.1 - 04 March, 2021 ### Bug fixes: - CLI: fix `knex init` not finding default knexfile [#4339](https://github.com/knex/knex/issues/4339) # 0.95.0 - 03 March, 2021 Note: there are many breaking changes in this version, particularly in TypeScript support. Please see `UPGRADING.md` for details. ### New features: - Add transaction isolation support [#4185](https://github.com/knex/knex/issues/4185) - Add analytic functions [#4188](https://github.com/knex/knex/issues/4188) - Change default to not trigger a promise rejection for transactions with a specified handler [#4195](https://github.com/knex/knex/issues/4195) - Make toSQL().toNative() work for Raw to match the API for QueryBuilder [#4058](https://github.com/knex/knex/issues/4058) - Allow 'match' operator [#3569](https://github.com/knex/knex/issues/3569) - Support optimizer hints [#4243](https://github.com/knex/knex/issues/4243) - Add parameter to prevent autoincrement columns from being primary keys [#4266](https://github.com/knex/knex/issues/4266) - Make "first" and "pluck" mutually exclusive [#4280](https://github.com/knex/knex/issues/4280) - Added merge strategy to allow selecting columns to upsert. [#4252](https://github.com/knex/knex/issues/4252) - Throw error if the array passed to insert is empty [#4289](https://github.com/knex/knex/issues/4289) - Events: introduce queryContext on query-error [#4301](https://github.com/knex/knex/issues/4301) - CLI: Use UTC timestamp for new migrations [#4245](https://github.com/knex/knex/issues/4245) - MSSQL: Replace MSSQL dialect with Tedious.js implementation [#2857](https://github.com/knex/knex/issues/2857) [#4281](https://github.com/knex/knex/issues/4281) - MSSQL: Use "nvarchar(max)" for ".json()" [#4278](https://github.com/knex/knex/issues/4278) - MSSQL: Schema builder - add predictable constraint names for default values [#4319](https://github.com/knex/knex/issues/4319) - MSSQL: Schema builder - attempt to drop default constraints when changing default value on columns [#4321](https://github.com/knex/knex/issues/4321) - SQLite: Fallback to json for sqlite3 when using jsonb [#4186](https://github.com/knex/knex/issues/4186) - SQLite: Return complete list of DDL commands for creating foreign keys [#4194](https://github.com/knex/knex/issues/4194) - SQLite: Support dropping composite foreign keys [#4202](https://github.com/knex/knex/issues/4202) - SQLite: Recreate indices when altering a table [#4277](https://github.com/knex/knex/issues/4277) - SQLite: Add support for altering columns [#4322](https://github.com/knex/knex/issues/4322) ### Bug fixes: - Fix issue with .withSchema usage with joins on a subquery [#4267](https://github.com/knex/knex/issues/4267) - Fix issue with schema usage with FROM clause contain QueryBuilder, function or Raw [#4268](https://github.com/knex/knex/issues/4268) - CLI: Address raised security warnings by dropping liftoff [#4122](https://github.com/knex/knex/issues/4122) - CLI: Fix an issue with npm@7 and ESM when `type` was set to `'module'` in `package.json` [#4295](https://github.com/knex/knex/issues/4295) - PostgreSQL: Add check to only create native enum once [#3658](https://github.com/knex/knex/issues/3658) - SQLite: Fix foreign key "on delete" when altering a table [#4225](https://github.com/knex/knex/issues/4225) - SQLite: Made the constraint detection case-insensitive [#4330](https://github.com/knex/knex/issues/4330) - MySQL: Keep auto increment after rename [#4266](https://github.com/knex/knex/issues/4266) - MSSQL: don't raise query-error twice [#4314](https://github.com/knex/knex/issues/4314) - MSSQL: Alter column must have its own query [#4317](https://github.com/knex/knex/issues/4317) ### Typings: - TypeScript 4.1+ is now required - Add missing onConflict overrides [#4182](https://github.com/knex/knex/issues/4182) - Introduce the "infamous triplet" export [#4181](https://github.com/knex/knex/issues/4181) - Fix type definition of Transaction [#4172](https://github.com/knex/knex/issues/4172) - Add typedefinitions for havingNotIn [#4265](https://github.com/knex/knex/issues/4265) - Include 'name' property in MigratorConfig [#4300](https://github.com/knex/knex/issues/4300) - Improve join and conflict types [#4318](https://github.com/knex/knex/issues/4318) - Fix ArrayIfAlready type [#4331](https://github.com/knex/knex/issues/4331) ### Test / internal changes: - Drop global Knex.raw [#4180](https://github.com/knex/knex/issues/4180) - Stop using legacy url.parse API [#3702](https://github.com/knex/knex/issues/3702) - Various internal refactorings [#4175](https://github.com/knex/knex/issues/4175) [#4177](https://github.com/knex/knex/issues/4177) [#4178](https://github.com/knex/knex/issues/4178) [#4192](https://github.com/knex/knex/issues/4192) - Refactor to classes [#4190](https://github.com/knex/knex/issues/4190) [#4191](https://github.com/knex/knex/issues/4191) [#4193](https://github.com/knex/knex/issues/4193) [#4210](https://github.com/knex/knex/issues/4210) [#4253](https://github.com/knex/knex/issues/4253) - Move transaction type tests to TSD [#4208](https://github.com/knex/knex/issues/4208) - Clean up destroy logic [#4248](https://github.com/knex/knex/issues/4248) - Colorize code snippets in readme files [#4234](https://github.com/knex/knex/issues/4234) - Add "Ecosystem" documentation for Knex plugins [#4183](https://github.com/knex/knex/issues/4183) - Documentation cleanup - SQLite: Use SQLite "rename column" instead of a DDL helper [#4200](https://github.com/knex/knex/issues/4200) - SQLite: Simplify reinsert logic when altering a table [#4272](https://github.com/knex/knex/issues/4272) # 0.21.19 - 02 March, 2021 - SQLite: Made the constraint detection case-insensitive [#4332](https://github.com/knex/knex/issues/4332) # 0.21.18 - 22 February, 2021 - CLI: Fix an issue with npm@7 and ESM when type was set to 'module' in package.json [#4295](https://github.com/knex/knex/issues/4295) # 0.21.17 - 30 January, 2021 ### Bug fixes: - SQLite: Fix SQLite foreign on delete when altering a table [#4261](https://github.com/knex/knex/issues/4261) ### New features: - Add support for optimizer hints (see https://github.com/knex/documentation/pull/306 for documentation) [#4243](https://github.com/knex/knex/issues/4243) # 0.21.16 - 17 January, 2021 ### Bug fixes: - MSSQL: Avoid passing unsupported pool param. Fixes node-mssql 7+ support [#4236](https://github.com/knex/knex/issues/4236) # 0.21.15 - 26 December, 2020 ### New features: - SQLite: Add primary/foreign support on alterTable [#4162](https://github.com/knex/knex/issues/4162) - SQLite: Add dropPrimary/dropForeign support on alterTable [#4162](https://github.com/knex/knex/issues/4162) ### Typings: - Add "after" and "first" to columnBuilder types [#3549](https://github.com/knex/knex/issues/3549) [#4169](https://github.com/knex/knex/issues/4169) ### Test / internal changes: - Extract knex config resolution logic [#4166](https://github.com/knex/knex/issues/4166) - Run CI using GitHub Actions [#4168](https://github.com/knex/knex/issues/4168) - Add Node.js 15 to CI matrix [#4173](https://github.com/knex/knex/issues/4173) # 0.21.14 - 18 December, 2020 ### New features: - MSSQL: support "returning" on inserts, updates and deletes on tables with triggers [#4152](https://github.com/knex/knex/issues/4152) - Use esm import if package.json type is "module" [#4158](https://github.com/knex/knex/issues/4158) ### Bug fixes: - Make sure query-response and query-error events contain \_knexTxId [#4160](https://github.com/knex/knex/issues/4160) ### Test / internal changes: - Improved integration test framework [#4161](https://github.com/knex/knex/issues/4161) # 0.21.13 - 12 December, 2020 ### New features: - SQLite: Add support for `dropForeign` [#4092](https://github.com/knex/knex/issues/4092) - Add support for WHERE clauses to "upsert" queries [#4148](https://github.com/knex/knex/issues/4148) ### Bug fixes: - MSSQL: Avoid connection getting stuck on socket hangup [#4157](https://github.com/knex/knex/issues/4157) - Oracle: Support specifying non-default DB port [#4147](https://github.com/knex/knex/issues/4147) - Oracle: Support inserts with only default values (empty body) [#4092](https://github.com/knex/knex/issues/4092) - CLI: fix irregular seed file execution order [#4156](https://github.com/knex/knex/issues/4156) - Fix performance of asyncStackTraces with enable-source-maps node flag [#4154](https://github.com/knex/knex/issues/4154) ### Typings: - PostgreSQL: Add support for application_name [#4153](https://github.com/knex/knex/issues/4153) - Fix types for insert to allow array [#4105](https://github.com/knex/knex/issues/4105) - Add types for userParams and withUserParams [#4119](https://github.com/knex/knex/issues/4119) - Added type for withKeyName [#4139](https://github.com/knex/knex/issues/4139) - Fix batchInsert definitions [#4131](https://github.com/knex/knex/issues/4131) - Fix types for WhereIn signature (value or query builder) [#3863](https://github.com/knex/knex/issues/3863) - Add types for connection config of mysql2 driver [#4144](https://github.com/knex/knex/issues/4144) ### Test / internal changes: - Move TS tests to tsd (WIP) [#4109](https://github.com/knex/knex/issues/4109) [#4110](https://github.com/knex/knex/issues/4110) # 0.21.12 - 02 November, 2020 ### Typings: - Reintroduce support for globally defining table/record mapping [#4100](https://github.com/knex/knex/issues/4100) - Add a few missing types for MSSQL Connection [#4103](https://github.com/knex/knex/issues/4103) - Make .ignore() and .merge() return QueryBuilder rather than QueryInterface [#4102](https://github.com/knex/knex/issues/4102) - Use tarn config TS types instead of generic-pool [#4064](https://github.com/knex/knex/issues/4064) # 0.21.11 - 01 November, 2020 ### Typings: - Revert support for globally defining table/record mapping [#4099](https://github.com/knex/knex/issues/4099) # 0.21.10 - 31 October, 2020 ### New features: - Upsert support (Postgres/MySQL/Sqlite) [#3763](https://github.com/knex/knex/issues/3763) ### Bug fixes: - Switch to non-uuid knexQueryUids to avoid issues when mocking global date [#4089](https://github.com/knex/knex/issues/4089) ### Typings: - Allow to globally define table/record mapping [#4071](https://github.com/knex/knex/issues/4071) # 0.21.9 - 27 October, 2020 ### New features: - add method clear(statement) to QueryBuilder [#4051](https://github.com/knex/knex/issues/4051) ### Bug fixes: - CLI: fix help text being printed twice [#4072](https://github.com/knex/knex/issues/4072) - Oracle: columnInfo() no longer requires an Owner User [#4053](https://github.com/knex/knex/issues/4053) - Add missing "start" event propagation from transaction [#4087](https://github.com/knex/knex/issues/4087) # 0.21.8 - 27 October, 2020 ### Bug fixes: - MSSQL: Escape properly if literal '?' is needed [#4053](https://github.com/knex/knex/issues/4053) - Make toQuery behavior consistent with pre-0.21.7 (do not break on empty builder) [#4083](https://github.com/knex/knex/issues/4083) - Fix comment escaping for MySQL and PostgreSQL [#4084](https://github.com/knex/knex/issues/4084) # 0.21.7 - 25 October, 2020 ### New features: - CLI: Add migration stub for .cjs extension [#4065](https://github.com/knex/knex/issues/4065) ### Bug fixes: - MSSQL: Add dynamic scaling for decimal values and prevents a UInt64 overflow [#3910](https://github.com/knex/knex/issues/3910) - MSSQL: Fix apostrophe escaping [#4077](https://github.com/knex/knex/issues/4077) - Ensure that semicolon is not appended to statements that already end with a semicolon [#4052](https://github.com/knex/knex/issues/4052) ### Typings: - Add arguments to QueryCallback in Where [#4034](https://github.com/knex/knex/issues/4034) ### Test / internal changes: - Replace lodash type-checks with native solutions [#4056](https://github.com/knex/knex/issues/4056) - Replace mkdirp with native recursive flag [#4060](https://github.com/knex/knex/issues/4060) - Replace inherits package with builtin utility [#4059](https://github.com/knex/knex/issues/4059) # 0.21.6 - 27 September, 2020 ### New features: - CLI: New config parameter / CLI flag to prefixing seed filename with timestamp [#3873](https://github.com/knex/knex/issues/3873) - CLI: throw an error when specific seed file cannot be found [#4011](https://github.com/knex/knex/issues/4011) - Warn if whereNot is used with 'in' or 'between' [#4038](https://github.com/knex/knex/issues/4038) ### Bug fixes: - CLI: Fix double merging of config for migrator [#4040](https://github.com/knex/knex/issues/4040) ### Typings: - Unify SeedsConfig and SeederConfig [#4003](https://github.com/knex/knex/issues/4003) - Allow string[] type for directory in SeedsConfig [#4033](https://github.com/knex/knex/issues/4033) # 0.21.5 - 17 August, 2020 ### New features: - CLI: Improve Esm interop [#3985](https://github.com/knex/knex/issues/3985) - CLI: Improve mjs module support [#3980](https://github.com/knex/knex/issues/3980) ### Test / internal changes: - Bump version of dtslint [#3984](https://github.com/knex/knex/issues/3984) - Test/document esm interop mixed formats (knexfile/migrations/seeds) [#3986](https://github.com/knex/knex/issues/3986) # 0.21.4 - 10 August, 2020 ### New features: - CLI: Add new option for seed: recursive [#3974](https://github.com/knex/knex/issues/3974) ### Bug fixes: - CLI: Do not load seeds from subfolders recursively by default [#3974](https://github.com/knex/knex/issues/3974) # 0.21.3 - 08 August, 2020 ### New features: - CLI: Support multiple directories for seeds [#3967](https://github.com/knex/knex/issues/3967) ### Bug fixes: - Ensure DB stream is destroyed when the PassThrough is destroyed [#2324](https://github.com/knex/knex/issues/2324) - Support postProcessResponse for streams [#3931](https://github.com/knex/knex/issues/3931) - Fix ESM module interop for calling module/package of type 'module' [#3938](https://github.com/knex/knex/issues/3938) - CLI: Fix migration source name in rollback all [#3956](https://github.com/knex/knex/issues/3956) - Fix getMergedConfig calls to include client logger [#3920](https://github.com/knex/knex/issues/3920) - Escape single quoted values passed to defaultTo function [#3899](https://github.com/knex/knex/issues/3899) ### Typings: - Add .timeout(ms) to .raw()'s typescript typings [#3885](https://github.com/knex/knex/issues/3885) - Add typing for double table column builder [#3950](https://github.com/knex/knex/issues/3950) - Add a phantom tag to Ref type to mark received type parameters as used [#3934](https://github.com/knex/knex/issues/3934) - Add `null` as valid binding type [#3946](https://github.com/knex/knex/issues/3946) ### Test / internal changes: - Change query lab link to https [#3933](https://github.com/knex/knex/issues/3933) # 0.21.2 - 10 July, 2020 ### New features: - Warn user if custom migration source is being reset [#3839](https://github.com/knex/knex/issues/3839) - Prefer `void` as return type on migration generator ts stub [#3865](https://github.com/knex/knex/issues/3865) - MSSQL: Added the removal of a columns default constraint, before dropping the column [#3855](https://github.com/knex/knex/issues/3855) ### Typings: - Fix definition for raw querybuilders [#3846](https://github.com/knex/knex/issues/3846) ### Test / internal changes: - Refactor migration logic to use async/await [#3838](https://github.com/knex/knex/issues/3838) # 0.21.1 - 28 April, 2020 ### New features: - CLI: Add migrate:unlock command, truncate on forceFreeMigrationsLock [#3822](https://github.com/knex/knex/issues/3822) - CLI: Add support for cjs files by default [#3829](https://github.com/knex/knex/issues/3829) ### Bug fixes: - CLI: Fix inference of seed/migration extension from knexfile extension [#3814](https://github.com/knex/knex/issues/3814) - rewrite delay to not node-only version. Fixes compatibility with browsers [#3820](https://github.com/knex/knex/issues/3820) ### Test / internal changes: - Update dependencies. Explicitly support Node.js 14 [#3825](https://github.com/knex/knex/issues/3825) [#3830](https://github.com/knex/knex/issues/3830) # 0.21.0 - 18 April, 2020 ### Improvements - Reduce size of lodash in bundle [#3804](https://github.com/knex/knex/issues/3804) ### Breaking changes - Dropped support for Node 8 - Breaking upstream change in `pg-query-stream`: `Changed stream.close to stream.destroy which is the official way to terminate a readable stream. This is a breaking change if you rely on the stream.close method on pg-query-stream...though should be just a find/replace type operation to upgrade as the semantics remain very similar (not exactly the same, since internals are rewritten, but more in line with how streams are "supposed" to behave).` ### Test / internal changes: - Updated Tarn.js to a version 3.0.0 - Updated mkdirp to a version 1.0.4 - Updated examples to use ES2015 style [#3810](https://github.com/knex/knex/issues/3810) # 0.20.15 - 16 April, 2020 ### Bug fixes: - Support for `.finally(..)` on knex's Promise-alikes [#3800](https://github.com/knex/knex/issues/3800) ### Typings: - Add types for `.distinctOn` [#3784](https://github.com/knex/knex/issues/3784) # 0.20.14 - 13 April, 2020 ### New features: - CLI: adds support for asynchronous knexfile loading [#3748](https://github.com/knex/knex/issues/3748) - Add clearGroup method [#3771](https://github.com/knex/knex/issues/3771) ### Typings: - Support Raw types for insert, where, update [#3730](https://github.com/knex/knex/issues/3730) - Add typings for MigrationSource [#3756](https://github.com/knex/knex/issues/3756) - Update signature of orderBy to support QueryBuilder inside array [#3757](https://github.com/knex/knex/issues/3757) - Add toSQL and toString to SchemaBuilder [#3758](https://github.com/knex/knex/issues/3758) - `interface Knex` and `function Knex` should have the same types [#3787](https://github.com/knex/knex/issues/3787) - Fix minor issues around typings [#3765](https://github.com/knex/knex/issues/3765) ### Test / internal changes: - Minor test internal enhancements [#3747](https://github.com/knex/knex/issues/3747) - Minor improvements on the usage of fs utilities [#3749](https://github.com/knex/knex/issues/3749) - Split tests in groups [#3785](https://github.com/knex/knex/issues/3785) # 0.20.13 - 23 March, 2020 ### Bug fixes: - Correctly handle dateToString escaping without timezone passed [#3742](https://github.com/knex/knex/issues/3742) - Make protocol length check more defensive [#3744](https://github.com/knex/knex/issues/3744) ### Typings: - Make the ChainableInterface conform to Promise<T> [#3724](https://github.com/knex/knex/issues/3724) # 0.20.12 - 19 March, 2020 ### Bug fixes: - Added missing call to \_reject in Transactor#transaction [#3706](https://github.com/knex/knex/issues/3706) - Fix method binding on knex proxy [#3717](https://github.com/knex/knex/issues/3717) - Oracle: Transaction_OracleDB can use config.connection [#3731](https://github.com/knex/knex/issues/3731) ### Typings: - Fix incorrect type signature of Having [#3719](https://github.com/knex/knex/issues/3719) ### Test / internal changes: - Cleanup/remove transaction stalling [#3716](https://github.com/knex/knex/issues/3716) - Rewrote Transaction#acquireConnection() methods to use async [#3707](https://github.com/knex/knex/issues/3707) # 0.20.11 - 26 February, 2020 ### Breaking changes: - Knex returns native JS promises instead of Bluebird ones. This means that you no long