knex
3.3.0 · 26 Jun 2026MIT7.3M / weekRepositoryHomepagenpmAtom feed
0.95.15 is the newest release of 0.15.x.
In short
11 breaking7 new6 fixed2 changed2 internal
- Breaking
Stop executing tests on Node 4 and 5. #2451 (not supported anymore)
- Breaking
jsondata type is no longer converted totextwithin a schema builder migration for MySQL databases (note that JSON data type is only supported for MySQL 5.7.8+) #2635 - Breaking
Removed WebSQL dialect #2461
- Breaking
Drop mariadb support #2681
- Breaking
Primary Key for Migration Lock Table #2569. This shouldn't affect to old loc tables, but if you like to have your locktable to have primary key, delete the old table and it will be recreated when migrations are ran next time.
- Breaking
Ensure knex.destroy() returns a bluebird promise #2589
- Breaking
Increment floats #2614
- Breaking
Testing removal of 'skim' #2520, Now rows are not converted to plain js objects, returned row objects might have changed type with oracle, mssql, mysql and sqlite3
Security
2 advisories affect 0.15.0; 2.4.0 fixes them
- CriticalSQL Injection in knexGHSA-58v4-qwx5-7f59 · 21 Oct 2019Fixed in 0.19.5
- HighKnex.js has a limited SQL injection vulnerabilityGHSA-4jv9-3563-23j3 · 19 Dec 2022Fixed in 2.4.0
Release note
0.15.0 - 1 Jul, 2018
Breaking Changes
- Breaking
Stop executing tests on Node 4 and 5. #2451 (not supported anymore)
- Breaking
jsondata type is no longer converted totextwithin a schema builder migration for MySQL databases (note that JSON data type is only supported for MySQL 5.7.8+) #2635 - Breaking
Removed WebSQL dialect #2461
- Breaking
Drop mariadb support #2681
- Breaking
Primary Key for Migration Lock Table #2569. This shouldn't affect to old loc tables, but if you like to have your locktable to have primary key, delete the old table and it will be recreated when migrations are ran next time.
- Breaking
Ensure knex.destroy() returns a bluebird promise #2589
- Breaking
Increment floats #2614
- Breaking
Testing removal of 'skim' #2520, Now rows are not converted to plain js objects, returned row objects might have changed type with oracle, mssql, mysql and sqlite3
- Breaking
Drop support for strong-oracle #2487
- Breaking
Timeout errors doesn't silently ignore the passed errors anymore #2626
- Breaking
Removed WebSQL dialect #2647
- Breaking
Various fixes to mssql dialect to make it compatible with other dialects #2653, Unique constraint now allow multiple null values, float type is now float instead of decimal, rolling back transaction with undefined rejects with Error, select for update and select for share actually locks selected row, so basically old schema migrations will work a lot different and produce different schema like before. Also now MSSQL is included in CI tests.
Bug fixes
Fixes onIn with empty values array #2513
Fix wrapIdentifier not being called in postgres alter column #2612
Fixes wrapIdentifier to work with postgres
returningstatement 2630 #2642Fix mssql driver crashing in certain cases when conneciton is closed unexpectedly #2637
Removed semicolon from rollback stmt for oracle #2564
Make the stream catch errors in the query #2638
New Features
Create timestamp columns with microsecond precision on MySQL 5.6 and newer #2542
Allow storing stacktrace, where builder is initialized to be able trace back where certain query was created #2500 #2505
Added 'ref' function #2509, no need for knex.raw('??', ['id']) anymore, one can do knex.ref('id')
Support postgresql connection uri protocol #2609
Add support for native enums on Postgres #2632
Allow overwriting log functions #2625
Test / internal changes
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.