UNPKG

57.9 kBMarkdownView Raw
1# Master (Unreleased)
2
3# 0.21.13 - 12 December, 2020
4
5### New features:
6
7- SQLite: Add support for `dropForeign` #4092
8- Add support for WHERE clauses to "upsert" queries #4148
9
10### Bug fixes:
11
12- MSSQL: Avoid connection getting stuck on socket hangup #4157
13- Oracle: Support specifying non-default DB port #4147
14- Oracle: Support inserts with only default values (empty body) #4092
15- CLI: fix irregular seed file execution order #4156
16- Fix performance of asyncStackTraces with enable-source-maps node flag #4154
17
18### Typings:
19
20- PostgreSQL: Add support for application_name #4153
21- Fix types for insert to allow array #4105
22- Add types for userParams and withUserParams #4119
23- Added type for withKeyName #4139
24- Fix batchInsert definitions #4131
25- Fix types for WhereIn signature (value or query builder) #3863
26- Add types for connection config of mysql2 driver #4144
27
28### Test / internal changes:
29
30- Move TS tests to tsd (WIP) #4109 #4110
31
32# 0.21.12 - 02 November, 2020
33
34### Typings:
35
36- Reintroduce support for globally defining table/record mapping #4100
37- Add a few missing types for MSSQL Connection #4103
38- Make .ignore() and .merge() return QueryBuilder rather than QueryInterface #4102
39- Use tarn config TS types instead of generic-pool #4064
40
41# 0.21.11 - 01 November, 2020
42
43### Typings:
44
45- Revert support for globally defining table/record mapping #4099
46
47# 0.21.10 - 31 October, 2020
48
49### New features:
50
51- Upsert support (Postgres/MySQL/Sqlite) #3763
52
53### Bug fixes:
54
55- Switch to non-uuid knexQueryUids to avoid issues when mocking global date #4089
56
57### Typings:
58
59- Allow to globally define table/record mapping #4071
60
61# 0.21.9 - 27 October, 2020
62
63### New features:
64
65- add method clear(statement) to QueryBuilder #4051
66
67### Bug fixes:
68
69- CLI: fix help text being printed twice #4072
70- Oracle: columnInfo() no longer requires an Owner User #4053
71- Add missing "start" event propagation from transaction #4087
72
73# 0.21.8 - 27 October, 2020
74
75### Bug fixes:
76
77- MSSQL: Escape properly if literal '?' is needed #4053
78- Make toQuery behavior consistent with pre-0.21.7 (do not break on empty builder) #4083
79- Fix comment escaping for MySQL and PostgreSQL #4084
80
81# 0.21.7 - 25 October, 2020
82
83### New features:
84
85- CLI: Add migration stub for .cjs extension #4065
86
87### Bug fixes:
88
89- MSSQL: Add dynamic scaling for decimal values and prevents a UInt64 overflow #3910
90- MSSQL: Fix apostrophe escaping #4077
91- Ensure that semicolon is not appended to statements that already end with a semicolon #4052
92
93### Typings:
94
95- Add arguments to QueryCallback in Where #4034
96
97### Test / internal changes:
98
99- Replace lodash type-checks with native solutions #4056
100- Replace mkdirp with native recursive flag #4060
101- Replace inherits package with builtin utility #4059
102
103# 0.21.6 - 27 September, 2020
104
105### New features:
106
107- CLI: New config parameter / CLI flag to prefixing seed filename with timestamp #3873
108- CLI: throw an error when specific seed file cannot be found #4011
109- Warn if whereNot is used with 'in' or 'between' #4038
110
111### Bug fixes:
112
113- CLI: Fix double merging of config for migrator #4040
114
115### Typings:
116
117- Unify SeedsConfig and SeederConfig #4003
118- Allow string[] type for directory in SeedsConfig #4033
119
120# 0.21.5 - 17 August, 2020
121
122### New features:
123
124- CLI: Improve Esm interop #3985
125- CLI: Improve mjs module support #3980
126
127### Test / internal changes:
128
129- Bump version of dtslint #3984
130- Test/document esm interop mixed formats (knexfile/migrations/seeds) #3986
131
132# 0.21.4 - 10 August, 2020
133
134### New features:
135
136- CLI: Add new option for seed: recursive #3974
137
138### Bug fixes:
139
140- CLI: Do not load seeds from subfolders recursively by default #3974
141
142# 0.21.3 - 08 August, 2020
143
144### New features:
145
146- CLI: Support multiple directories for seeds #3967
147
148### Bug fixes:
149
150- Ensure DB stream is destroyed when the PassThrough is destroyed #2324
151- Support postProcessResponse for streams #3931
152- Fix ESM module interop for calling module/package of type 'module' #3938
153- CLI: Fix migration source name in rollback all #3956
154- Fix getMergedConfig calls to include client logger #3920
155- Escape single quoted values passed to defaultTo function #3899
156
157### Typings:
158
159- Add .timeout(ms) to .raw()'s typescript typings #3885
160- Add typing for double table column builder #3950
161- Add a phantom tag to Ref type to mark received type parameters as used #3934
162- Add `null` as valid binding type #3946
163
164### Test / internal changes:
165
166- Change query lab link to https #3933
167
168# 0.21.2 - 10 July, 2020
169
170### New features:
171
172- Warn user if custom migration source is being reset #3839
173- Prefer `void` as return type on migration generator ts stub #3865
174- MSSQL: Added the removal of a columns default constraint, before dropping the column #3855
175
176### Typings:
177
178- Fix definition for raw querybuilders #3846
179
180### Test / internal changes:
181
182- Refactor migration logic to use async/await #3838
183
184# 0.21.1 - 28 April, 2020
185
186### New features:
187
188- CLI: Add migrate:unlock command, truncate on forceFreeMigrationsLock #3822
189- CLI: Add support for cjs files by default #3829
190
191### Bug fixes:
192
193- CLI: Fix inference of seed/migration extension from knexfile extension #3814
194- rewrite delay to not node-only version. Fixes compatibility with browsers #3820
195
196### Test / internal changes:
197
198- Update dependencies. Explicitly support Node.js 14 #3825 #3830
199
200# 0.21.0 - 18 April, 2020
201
202### Improvements
203
204- Reduce size of lodash in bundle #3804
205
206### Breaking changes
207
208- Dropped support for Node 8
209- 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).`
210
211### Test / internal changes:
212
213- Updated Tarn.js to a version 3.0.0
214- Updated mkdirp to a version 1.0.4
215- Updated examples to use ES2015 style #3810
216
217# 0.20.15 - 16 April, 2020
218
219### Bug fixes:
220
221- Support for `.finally(..)` on knex's Promise-alikes #3800
222
223### Typings:
224
225- Add types for `.distinctOn` #3784
226
227# 0.20.14 - 13 April, 2020
228
229### New features:
230
231- CLI: adds support for asynchronous knexfile loading #3748
232- Add clearGroup method #3771
233
234### Typings:
235
236- Support Raw types for insert, where, update #3730
237- Add typings for MigrationSource #3756
238- Update signature of orderBy to support QueryBuilder inside array #3757
239- Add toSQL and toString to SchemaBuilder #3758
240- `interface Knex` and `function Knex` should have the same types #3787
241- Fix minor issues around typings #3765
242
243### Test / internal changes:
244
245- Minor test internal enhancements #3747
246- Minor improvements on the usage of fs utilities #3749
247- Split tests in groups #3785
248
249# 0.20.13 - 23 March, 2020
250
251### Bug fixes:
252
253- Correctly handle dateToString escaping without timezone passed #3742
254- Make protocol length check more defensive #3744
255
256### Typings:
257
258- Make the ChainableInterface conform to Promise<T> #3724
259
260# 0.20.12 - 19 March, 2020
261
262### Bug fixes:
263
264- Added missing call to _reject in Transactor#transaction #3706
265- Fix method binding on knex proxy #3717
266- Oracle: Transaction_OracleDB can use config.connection #3731
267
268### Typings:
269
270- Fix incorrect type signature of Having #3719
271
272### Test / internal changes:
273
274- Cleanup/remove transaction stalling #3716
275- Rewrote Transaction#acquireConnection() methods to use async #3707
276
277# 0.20.11 - 26 February, 2020
278
279### Breaking changes:
280
281- Knex returns native JS promises instead of Bluebird ones. This means that you no longer use such methods as `map`, `spread` and `reduce` on QueryBuilder instance.
282
283### New features:
284
285- Oracle: Add OracleDB handling for buffer type in fetchAsString #3685
286
287### Bug fixes:
288
289- Fix race condition in non-container transactions #3671
290
291### Typings:
292
293- Mark knex arguments of composite/collection types to be readonly #3680
294
295### Test / internal changes:
296
297- Remove dependency on Bluebird methods from sources #3683
298- Cleanup and extract Transaction Workflow logic #3674
299
300# 0.20.10 - 13 February, 2020
301
302### Bug fixes:
303
304- Oracle: commit was a no-op causing race conditions #3668
305- CLI: Knex calls process.chdir() before opening Knexfile #3661
306- Fixed unresolved promise in cancelQuery() #3666
307
308### Typings:
309
310- `fn.now` takes optionally a precision argument. #3662
311- PG: Include SSL in connection definition #3659
312
313### Test / internal changes:
314
315- replace Bluebird.timeout #3634
316
317# 0.20.9 - 08 February, 2020
318
319### Bug fixes:
320
321- CLI: Improve Support for Liftoff's Preloaders - this should fix some cases like using TS for your migrations #3613
322
323### Typings:
324
325- MSSQL: Add `enableArithAbort` to `MsSqlConnectionConfig`
326
327### Test / internal changes:
328
329- Refactor more tests to use cli-testlab #3640
330- Update QueryCompiler implementation to use classes #3647
331
332# 0.20.8 - 14 January, 2020
333
334### New features:
335
336- CLI: Support ES6 modules via flag --esm #3616
337
338### Bug fixes:
339
340- CLI: Print help only when there are no arguments #3617
341
342### Typings:
343
344- Fix incorrect type of QueryBuilder.first('*') result #3621
345
346# 0.20.7 - 07 January, 2020
347
348### New features:
349
350- Throw better error when trying to modify schema while using unsupported dialect #3609
351
352### Bug fixes:
353
354- Oracle: dispose connection on connection error #3611
355- Oracle: fix not releasing connection from pool on disconnect #3605
356- CLI: prevent warning with root command #3604
357
358### Typings:
359
360- Add create/drop schema methods to SchemaBuilder #3579
361
362# 0.20.6 - 29 December, 2019
363
364### Bug fixes:
365
366- Enforce Unix (lf) line terminators #3598
367
368# 0.20.5 - 29 December, 2019
369
370### New features:
371
372- Return more information about empty updates #3597
373
374### Bug fixes:
375
376- Fix colors in debug logs #3592
377
378### Test / internal changes:
379
380- Use more efficient algorithm for generating internal ids #3595 #3596
381- Use Buffer.alloc() instead of deprecated constructor #3574
382
383# 0.20.4 - 08 December, 2019
384
385### Bug fixes:
386
387- Fix debug logger messing up queries with % #3566
388- Make logger methods mutually consistent #3567
389
390### Typings:
391
392- Add missing methods to client type #3565
393- Fix queryContext function defintion #3562
394- Fix QueryBuilder.extend this type #3526 #3528
395
396### Test / internal changes:
397
398- Remove bluebird.using #3552
399
400# 0.20.3 - 27 November, 2019
401
402### New features:
403
404- MSSQL, MySQL: Add connection string qs to connection params #3547
405
406### Bug fixes:
407
408- Oracle: Fix issue retrieving BLOB from database #3545
409- PostgreSQL: Timeout for postgresql use cancel instead of terminate #3518
410- Make sure CLI works for namespaced knex packages #2539
411
412### Typings:
413
414- Lift up dialect specific methods in the CreateTableBuilder #3532
415- Add client property to QueryBuilder type #3541
416- Support 'only' option #3551
417
418# 0.20.2 - 14 November, 2019
419
420### New features:
421
422- Add support for distinct on for postgres #3513
423
424### Bug fixes:
425
426- Make sqlite3 hasColumn case insensitive #3435
427
428### Typings:
429
430- Fix PoolConfig typing #3505
431- Expand SeedsConfig types #3531
432- Make the default type parameters of QueryBuilder less strict #3520
433- Fix regression in older version of node when Promise#finally was not available #3507
434
435# 0.20.1 - 29 October, 2019
436
437### New features:
438
439- Declare drivers as optional peerDependencies #3081
440- Dynamic connection configuration resolution #3497
441
442### Bug fixes:
443
444- Wrap subQuery with parenthesis when it appears as table name #3496
445- Fix Oracle error codes #3498
446
447### Typings:
448
449- Add interface for PG Connection object #3372
450- Gracefully handle global promise pollution #3502
451
452# 0.20.0 - 25 October, 2019
453
454### New features:
455
456- orderBy accepts QueryBuilder #3491
457- Add validation in `.offset()` #2908
458- disable_migrations_list_validation feature #3448
459
460### Bug fixes:
461
462- Fix oracledb driver v4 support #3480
463- Fix some issues around seed and migration generation #3479
464- Fix bugs in replacement logic used when dropping columns in SQLite #3476
465
466### Typings:
467
468- Add types to the Migrator interface #3459
469- Fix typings of index and dropIndex TableBuilder methods #3486
470- Fixes types for Seeder#run #3438
471
472### Test / internal changes:
473
474- Execute CI on Node.js 13
475- Bluebird: remove usage of `return`, `reflect`, `fromCallback` methods #3483
476- Bluebird: remove Bluebird.bind #3477
477- Bluebird: use util.promisify instead of Bluebird.promisify #3470
478- Bluebird: remove Bluebird.each #3471
479- Bluebird: remove Bluebird.map and Bluebird.mapSeries #3474
480- Bluebird: replace Bluebird.map with Promise.all #3469
481- Update badges #3482
482
483# 0.19.5 - 06 October, 2019
484
485### New features:
486
487- CLI: Migrations up/down commands - filename parameter #3416
488- Oracle: Support stored procedures #3449
489
490### Bug fixes:
491
492- MSSQL: Escape column ids correctly in all cases (reported by Snyk Security Research Team) #3382
493- SQLite: Fix handling of multiline SQL in SQLite3 schema #3411
494- Fix concurrent child transactions failing #2213 #3440
495
496### Typings:
497
498- Add missing Migrator.list typing #3460
499- Fix Typescript type inference for to better support wildcard (*) calls #3444
500- Make options argument optional in timeout #3442
501
502### Test / internal changes:
503
504- Enable linting in CI #3450
505
506# 0.19.4 - 09 September, 2019
507
508### New features:
509
510- Add undefined columns to undefined binding(s) error #3425
511
512### Typings:
513
514- Add `specific` to SeederConfig type #3429
515- Fix some issues with QueryBuilder types #3427
516
517# 0.19.3 - 25 August, 2019
518
519### Bug fixes:
520
521- Fix migrations for native enums to use table schema #3307
522
523### New features:
524
525- Add ability to manually define schema for native enums #3307
526- Add SSL/TLS support for Postgres connection string #3410
527- CLI: new command that lists all migrations with status #3390
528
529### Typings:
530
531- Include schemaName in EnumOptions #3415
532- Allow `ColumnBuilder.defaultTo()` to be `null` #3407
533
534### Changes:
535
536- migrate: Refactor _lockMigrations to avoid forUpdate - makes migrations compatible with CockroachDB #3395
537
538# 0.19.2 - 17 August, 2019
539
540### Changes:
541
542- Make transaction rejection consistent across dialects #3399
543- More consistent handling of nested transactions #3393
544
545### New features:
546
547- Fallback to JSON when using JSONB in MySQL #3394
548
549# 0.19.1 - 23 July, 2019
550
551### New features:
552
553- Allow to extend knex query builder #3334
554- Add .isCompleted() to transaction #3368
555- Minor enhancements around aliasing of aggregates #3354
556
557### Typings:
558
559- Update configuration typings to allow for oracle db connectionstring #3361
560- Update Knex.raw type to be any by default because the actual type is dialect specific #3349
561
562# 0.19.0 - 11 July, 2019
563
564### Changes:
565
566- Pooling: tarn.js connection pool was updated to version 2.0.0. This fixes issue with destroying connections and introduces support for connection pool event handlers. Please see tarn.js documentation for more details #3345
567- Pooling: Passing unsupported pooling configuration options now throws an error
568- Pooling: `beforeDestroy` configuration option was removed
569
570# 0.18.4 - 10 July, 2019
571
572### New features:
573
574- Seeds: Option to run specific seed file #3335
575- Implement "skipLocked()" and "noWait()" #2961
576
577### Bug fixes:
578
579- CLI: Respect the knexfile stub option while generating a migration #3337
580- Fix mssql import not being ignored, breaking webpack builds #3336
581
582# 0.18.3 - 04 July, 2019
583
584### New features:
585
586- CLI: add --stub option to migration:make #3316
587
588### Bug fixes:
589
590- Fix return duplicate transaction promise for standalone transactions #3328
591
592# 0.18.2 - 03 July, 2019
593
594### Bug fixes:
595
596- Fix remove duplicate transaction rejection #3324
597- Fix issues around specifying default values for columns #3318
598- CLI: Fix empty --version output #3312
599
600# 0.18.1 - 30 June, 2019
601
602### Bug fixes:
603
604- Do not reject duplicate promise on transaction rollback #3319
605
606# 0.18.0 - 26 June, 2019
607
608### Bug fixes:
609
610- Do not reject promise on transaction rollback (by default only for new, non-callback, style of transactions for now to avoid breaking old code) #3235
611
612### New features:
613
614- Added `doNotRejectOnRollback` options for starting transactions, to prevent rejecting promises on rollback for callback-style transactions.
615- Use extension from knexfile for generating migrations unless overriden #3282
616- Use migrations.extension from config when generating migration #3242
617- Expose executionPromise for transactors #3297
618
619### Bug fixes:
620
621- Oracle: Updated handling of connection errors for disposal #2608
622- Fix extension resolution from env configs #3294
623
624### Test / internal changes:
625
626- Drop support for Node.js 6 #3227
627- Remove Babel #3227
628- Remove Bluebird #3290 #3287 #3285 #3267 #3266 #3263
629- Fix comments that were modified by find & replace #3308
630
631### Typings:
632
633- Add workarounds for degraded inference when strictNullChecks is set to false #3275
634- Add stub type definition for Migrator config #3279
635- Add stub to seeds type #3296
636- Fix MSSQL config typings #3269
637- Add pgsql specific table builder method typings #3146
638
639# 0.17.5 - 8 June, 2019
640
641### Typings:
642
643- Include result.d.ts in published package #3271
644
645# 0.17.4 - 8 June, 2019
646
647### Typings:
648
649- Fix some cases of left-to-right inference causing type mismatch #3265
650- Improve count typings #3249
651
652### Bug fixes:
653
654- Fix error message bubbling up on seed error #3248
655
656# 0.17.3 - 2 June, 2019
657
658### Typings:
659
660- Improve typings for aggregations #3245
661- Add decimalNumbers to MySqlConnectionConfig interface #3244
662
663# 0.17.2 - 1 June, 2019
664
665### Typings
666
667- Improve count typings #3239
668
669### Bug fixes:
670
671- "colorette" dependency breaks browserify builds #3238
672
673# 0.17.1 - 31 May, 2019
674
675### New features:
676
677- Add migrate:down functionality #3228
678
679### Typings:
680
681- Update type of aggregation results to not be arrays when first has been invoked before #3237
682- Include undefined in type of single row results #3231
683- Fix incorrect type definitions for single row queries #3230
684
685# 0.17.0 - 28 May, 2019
686
687### New features:
688
689- Add support for returning started transaction without immediately executing it #3099
690- Add support for passing transaction around with only starting it when needed #3099
691- Add clearHaving function #3141
692- Add --all flag for rollback in CLI #3187
693- Add error detail log to knex CLI #3149
694- Support multi-column whereIn in sqlite through values clause #3220
695- Allow users to specify the migrations "tableName" parameter via the CLI #3214
696- Unify object options handling for datetime/timestamp across dialects #3181
697- Add "up" command for migrations #3205
698
699### Typings:
700
701- Add default values for generic types (fixes backwards compatibility broken by 0.16.6) #3189
702- Make function types generic in type definitions #3168
703- Add missing types to MigratorConfig #3174
704- Add types for havingBetween, orHavingBetween, havingNotBetween and orHavingNotBetween #3144
705- Update Knex.Config types to include log #3221
706- Fix some more cases of missing typings #3223
707- Support type safe refs #3215
708- Expose some utility types #3211
709- Fix issues with typings of joins and some conflicts with Bluebird typings #3209
710
711### Bug fixes:
712
713- Fix order of migration rollback #3172
714
715### Test / internal changes:
716
717- Execute CI tests on Node.js 12 #3171
718- Docker-based test dbs #3157
719- Use cli-testlab for testing CLI #3191
720
721# 0.16.5 - 11 Apr, 2019
722
723- Bundle polyfills with knex for 0.16.x line again #3139
724
725# 0.16.4 - 11 Apr, 2019
726
727### New features:
728
729- Boolean param for rollback() to rollback all migrations #2968
730- seed:run print the file name of the failing seed #2972 #2973
731- verbose option to CLI commands #2887
732- add intersect() #3023
733- Improved format for TS stubs #3080
734- MySQL: Support nullable timestamps #3100
735- MySQL: Warn `.returning()` does not have any effect #3039
736
737### Bug fixes:
738
739- Respect "loadExtensions" configuration #2969
740- Fix event listener duplication when using Migrator #2982
741- Fix fs-migrations breaking docs #3022
742- Fix sqlite3 drop/renameColumn() breaks with postProcessResponse #3040
743- Fix transaction support for migrations #3084
744- Fix queryContext not being passed to raw queries #3111
745- Typings: Allow to pass query builders, identifiers and raw in various places as parameters #2960
746- Typings: toNative() definition #2996
747- Typings: asCallback() definition #2963
748- Typings: queryContext() type definition Knex.Raw #3002
749- Typings: Add "constraintName" arg to primary() definition #3006
750- Typings: Add missing schemaName in MigratorConfig #3016
751- Typings: Add missing supported parameter types and toSQL method #2960
752- Typings: Update enum arguments to reflect latest signature #3043
753- Typings: Add size parameter to integer method #3074
754- Typings: Add 'string' as accepted Knex constructor type definition #3105
755- Typings: Add boolean as a column name in join #3121
756- Typings: Add missing clearOrder & clearCounters types #3109
757- Dependencies: Fix security warning #3082
758- Do not use unsupported column width/length arguments on data types int and tinyint in MSSQL #2738
759
760### Changes:
761
762- Make unionAll()'s call signature match union() #3055
763
764### Test / internal changes:
765
766- Swap chalk→colorette / minimist→getopts #2718
767- Always use well documented pg client query() config argument #3004
768- Do not bundle polyfills with knex #3024
769
770# 0.16.3 - 19 Dec, 2018
771
772### Bug fixes:
773
774- @babel/polyfill loaded multiple times #2955
775- Resolve migrations and seeds relatively to knexfile directory when specified (the way it used to be before 0.16.1) #2952
776
777# 0.16.2 - 10 Dec, 2018
778
779### Bug fixes:
780
781- Add TypeScript types to the "files" entry so they are properly included in the release #2943
782
783# 0.16.1 - 28 Nov, 2018
784
785### Breaking Changes:
786
787- Use datetime2 for MSSQL datetime + timestamp types. This change is incompatible with MSSQL older than 2008 #2757
788- Knex.VERSION() method was removed, run "require('knex/package').version" instead #2776
789- Knex transpilation now targets Node.js 6, meaning it will no longer run on older Node.js versions #2813
790- Add json type support for SQLite 3.9+ (tested to work with Node package 'sqlite3' 4.0.2+) #2814
791
792### New features:
793
794- Support passing explicit connection to query builder (#2817)
795- Introduced abstraction for getting migrations to make migration bundling easier #2775
796- Allow timestamp with timezone on mssql databases #2724
797- Allow specifying multiple migration directories #2735
798- Allow cloning query builder with .userParams({}) assigned to it #2802
799- Allow chaining of increment, decrement, and update #2740
800- Allow table names with `forUpdate`/`forShare` #2834
801- Added `whereColumn` and the associated `not` / `and` / `or` methods for using columns on the right side of a where clause #2837
802- Added `whereRecursive` method to make self-referential CTEs possible #2889
803- Added support for named unique, primary and foreign keys to SQLite3 #2840
804- Added support for generating new migration and seed files without knexfile #2884 #2905 #2935
805- Added support for multiple columns in `.orderBy()` #2881
806- Added option of `existingType` to `.enum()` method to support repeated use of enums #2719
807- Added option to pass `indexType` for MySQL dialect #2890
808- Added `onVal` and the associated `not` / `and` / `or` methods for using values in `on` clauses within joins #2746
809- Kill queries after timeout for PostgreSQL #2636
810- Manage TypeScript types internally #2845
811- Support 5.0.0+ versions of mssql driver #2861
812- Typescript migration stub #2816
813- Options object for passing timestamp parameters + regression tests #2919
814
815### Bug fixes:
816
817- Implement fail-fast logic for dialect resolution #2776
818- Fixed identifier wrapping for `using()`. Use columnize instead of wrap in using() #2713
819- Fix issues with warnPromise when migration does not return a promise #2730
820- Compile with before update so that bindings are put in correct order #2733
821- Fix join using builder withSchema #2744
822- Throw instead of process.exit when client module missing #2843
823- Display correct filename of a migration that failed #2910
824- Fixed support of knexSnakeCaseWrappers in migrations #2914
825- SQlite3 renameColunm quote fix #2833
826- Adjust typing for forUpdate()/forShare() variant with table names #2858
827- Fix execution of Oracle tests on Node 11 #2920
828- Fix failures in oracle test bench and added it back to mandatory CI tests #2924
829- Knex client knexfile resolution fix #2923
830- Add queryContext to type declarations #2931
831
832### Test / internal changes:
833
834- Add tests for multiple union arguments with callbacks and builders #2749
835- Update dependencies #2772 #2810 #2842 #2848 #2893 #2904
836- Separate migration generator #2786
837- Do not postprocess internal queries in Migrator #2914 #2934
838- Use Babel 7 #2813
839- Introduce LGTM.com badge #2755
840- Cleanup based on analysis by https://lgtm.com #2870
841- Add test for retrieving null dates #2865
842- Add link to wiki #2866
843- Add tests for specifying explicit pg version #2895
844- Execute tests on Node.js 11 #2873
845- Version upgrade guide #2894
846
847# 0.16.0 - 27 Nov, 2018
848
849### Changes:
850
851- THIS RELEASE WAS UNPUBLISHED FROM NPM BECAUSE IT HAD BROKEN MIGRATIONS USING `postprocessResponse` FEATURE (#2644)
852
853# 0.15.2 - 19 Jul, 2018
854
855### Changes:
856
857- Rolled back changes introduced by #2542, in favor of opt-in behavior by adding a precision option in `date` / `timestamp` / `datetime` / `knex.fn.now` (#2715, #2721)
858
859# 0.15.1 - 12 Jul, 2018
860
861### Bug fixes:
862
863- Fix warning erroneously displayed for mysql #2705
864
865# 0.15.0 - 1 Jul, 2018
866
867### Breaking Changes:
868
869- Stop executing tests on Node 4 and 5. #2451 (not supported anymore)
870- `json` data type is no longer converted to `text` within a schema builder migration for MySQL databases (note that JSON data type is only supported for MySQL 5.7.8+) #2635
871- Removed WebSQL dialect #2461
872- Drop mariadb support #2681
873- 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.
874- Ensure knex.destroy() returns a bluebird promise #2589
875- Increment floats #2614
876- 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
877- Drop support for strong-oracle #2487
878- Timeout errors doesn't silently ignore the passed errors anymore #2626
879- Removed WebSQL dialect #2647
880- 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 instaed 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.
881
882### Bug fixes:
883
884- Fixes onIn with empty values array #2513
885- fix wrapIdentifier not being called in postgres alter column #2612
886- fixes wrapIdentifier to work with postgres `returning` statement 2630 #2642
887- Fix mssql driver crashing in certain cases when conneciton is closed unexpectedly #2637
888- Removed semicolon from rollback stmt for oracle #2564
889- Make the stream catch errors in the query #2638
890
891### New Features:
892
893- Create timestamp columns with microsecond precision on MySQL 5.6 and newer #2542
894- Allow storing stacktrace, where builder is initialized to be able trace back where certain query was created #2500 #2505
895- Added 'ref' function #2509, no need for knex.raw('??', ['id']) anymore, one can do knex.ref('id')
896- Support postgresql connection uri protocol #2609
897- Add support for native enums on Postgres #2632
898- Allow overwriting log functions #2625
899
900### Test / internal changes:
901
902- chore: cache node_modules #2595
903- Remove babel-plugin-lodash #2634
904- Remove readable-stream and safe-buffer #2640
905- chore: add Node.js 10 #2594
906- add homepage field to package.json #2650
907
908# 0.14.6 - 12 Apr, 2018
909
910### Bug fixes:
911
912- Restored functionality of query event #2566 (#2549)
913
914# 0.14.5 - 8 Apr, 2018
915
916### Bug fixes:
917
918- Fix wrapping returning column on oracledb #2554
919
920### New Features:
921
922- Support passing DB schema name for migrations #2499 #2559
923- add clearOrder method #2360 #2553
924- Added knexTxId to query events and debug calls #2476
925- Support multi-column `whereIn` with query #1390
926- Added error if chaining update/insert/etc with first() #2506
927- Checks for an empty, undefined or null object on transacting #2494
928- countDistinct with multiple columns #2449
929
930### Test / internal changes:
931
932- Added npm run test:oracledb command that runs oracledb tests in docker #2491
933- Runnin mssql tests in docker #2496
934- Update dependencies #2561
935
936# 0.14.4 - 19 Feb, 2018
937
938### Bug fixes:
939
940- containsUndefined only validate plain objects. Fixes #1898 (#2468)
941- Add warning when using .returning() in sqlite3. Fixes #1660 (#2471)
942- Throw an error if .update() results in an empty sql (#2472)
943- Removed unnecessary createTableIfNotExist and replaced with createTable (#2473)
944
945### New Features:
946
947- Allow calling lock procedures (such as forUpdate) outside of transaction. Fixes #2403. (#2475)
948- Added test and documentation for Event 'start' (#2488)
949
950### Test / internal changes:
951
952- Added stress test, which uses TCP proxy to simulate flaky connection #2460
953- Removed old docker tests, new stress test setup (#2474)
954- Removed unused property \_\_cid on the base client (#2481)
955- Changed rm to rimraf in 'npm run dev' (#2483)
956- Changed babel preset and use latest node as target when running dev (#2484)
957
958# 0.14.3 - 8 Feb, 2018
959
960### Bug fixes:
961
962- Use tarn as pool instead of generic-pool which has been given various problems #2450
963- Fixed mysql issue where add columns failed if using both after and collate #2432
964- CLI sets exit-code 1 if the command supplied was not parseable #2358
965- Set toNative() to be not enumerable #2388
966- Use wrapIdentifier in columnInfo. fixes #2402 #2405
967- Fixed a bug when using .returning (OUTPUT) in an update query with joins in MSSQL #2399
968- Better error message when running migrations fail before even starting run migrations #2373
969- Read oracle's UV_THREADPOOL_SIZE env variable correctly #2372
970- Added decimal variable precision / scale support #2353
971
972### New Features:
973
974- Added queryContext to schema and query builders #2314
975- Added redshift dialect #2233
976- Added warning when one uses .createTableIfNotExist and deprecated it from docs #2458
977
978### Test / internal changes:
979
980- Update dependencies and fix ESLint warnings accordingly #2433
981- Disable oracledb tests from non LTS nodes #2407
982- Update dependencies #2422
983
984# 0.14.2 - 24 Nov, 2017
985
986### Bug fixes:
987
988- Fix sqlite3 truncate method to work again #2348
989
990# 0.14.1 - 19 Nov, 2017
991
992### Bug fixes:
993
994- Fix support for multiple schema names in in postgres `searchPath` #2340
995- Fix create new connection to pass errors to query instead of retry loop #2336
996- Fix recognition of connections closed by server #2341
997
998# 0.14.0 - 6 Nov, 2017
999
1000### Breaking Changes:
1001
1002- Remove sorting of statements from update queries #2171
1003- Updated allowed operator list with some missing operators and make all to lower case #2239
1004- Use node-mssql 4.0.0 #2029
1005- Support for enum columns to SQlite3 dialect #2055
1006- Better identifier quoting in Sqlite3 #2087
1007- Migration Errors - Display filename of of failed migration #2272
1008
1009### Other Features:
1010
1011- Post processing hook for query result #2261
1012- Build native SQL where binding parameters are dialect specific #2237
1013- Configuration option to allow override identifier wrapping #2217
1014- Implemented select syntax: select({ alias: 'column' }) #2227
1015- Allows to filter seeds and migrations by extensions #2168
1016- Reconnecting after database server disconnect/reconnect + tests #2017
1017- Removed filering from allowed configuration settings of mysql2 #2040
1018- Allow raw expressions in query builder aggregate methods #2257
1019- Throw error on non-string table comment #2126
1020- Support for mysql stream query options #2301
1021
1022### Bug fixes:
1023
1024- Allow update queries and passing query builder to with statements #2298
1025- Fix escape table name in SQLite columnInfo call #2281
1026- Preventing containsUndefined from going to recursion loop #1711
1027- Fix error caused by call to knex.migrate.currentVersion #2123
1028- Upgraded generic-pool to 3.1.7 (did resolve some memory issues) #2208
1029- Allow using NOT ILIKE operator #2195
1030- Fix postgres searchPath to be case-sensitive #2172
1031- Fix drop of multiple columns in sqlite3 #2107
1032- Fix adding multiple columns in Oracle #2115
1033- Use selected schema when dropping indices in Postgres. #2105
1034- Fix hasTable for MySQL to not do partial matches #2097
1035- Fix setting autoTransaction in batchInsert #2113
1036- Fix connection error propagation when streaming #2199
1037- Fix comments not being applied to increments columns #2243
1038- Fix mssql wrong binding order of queries that combine a limit with select raw or update #2066
1039- Fixed mysql alter table attributes order #2062
1040
1041### Test / internal changes:
1042
1043- Update each out-of-date dependency according to david-dm.org #2297
1044- Update v8flags to version 3.0.0 #2288
1045- Update interpret version #2283
1046- Fix debug output typo #2187
1047- Docker CI tests #2164
1048- Unit test for right/rightOuterJoin combination #2117
1049- Unit test for fullOuterJoin #2118
1050- Unit tests for table comment #2098
1051- Test referencing non-existent column with sqlite3 #2104
1052- Unit test for renaming column in postgresql #2099
1053- Unit test for cross-join #2102
1054- Fix incorrect parameter name #2068
1055
1056# 0.13.0 - 29 Apr, 2017
1057
1058### Breaking Changes:
1059
1060- Multiple concurrent migration runners blocks instead of throwing error when possible #1962
1061- Fixed transaction promise mutation issue #1991
1062
1063### Other Changes:
1064
1065- Allow passing version of connected db in configuration file #1993
1066- Bugfixes on batchInsert and transactions for mysql/maria #1992
1067- Add fetchAsString optional parameter to oracledb dialect #1998
1068- fix: escapeObject parameter order for Postgres dialect. #2003
1069
1070# 0.12.9 - 23 Mar, 2017
1071
1072- Fixed unhandled exception in batchInsert when the rows to be inserted resulted in duplicate key violation #1880
1073
1074# 0.12.8 - 15 Mar, 2017
1075
1076- Added clearSelect and clearWhere to query builder #1912
1077- Properly close Postgres query streams on error #1935
1078- Transactions should never reject with undefined #1970
1079- Clear acquireConnectionTimeout if an error occurs when acquiring a connection #1973
1080
1081# 0.12.7 - 17 Feb, 2017
1082
1083### Accidental Breaking Change:
1084
1085- Ensure that 'client' is provided in knex config object #1822
1086
1087### Other Changes:
1088
1089- Support custom foreign key names #1311, #1726
1090- Fixed named bindings to work with queries containing `:`-chars #1890
1091- Exposed more promise functions #1896
1092- Pass rollback errors to transaction promise in mssql #1885
1093- ONLY keyword support for PostgreSQL (for table inheritance) #1874
1094- Fixed Mssql update with join syntax #1777
1095- Replace migrations and seed for react-native packager #1813
1096- Support knexfile, migration and seeds in TypeScript #1769
1097- Fix float to integer conversion of decimal fields in MSSQL #1781
1098- External authentication capability when using oracledb driver #1716
1099- Fixed MSSQL incorect query build when locks are used #1707
1100- Allow to use `first` method as aliased select #1784
1101- Alter column for nullability, type and default value #46, #1759
1102- Add more having* methods / join clause on* methods #1674
1103- Compatibility fixes and cleanups #1788, #1792, #1794, #1814, #1857, #1649
1104
1105# 0.12.6 - 19 Oct, 2016
1106
1107- Address warnings mentioned in #1388 (#1740)
1108- Remove postinstall script (#1746)
1109
1110# 0.12.5 - 12 Oct, 2016
1111
1112- Fix broken 0.12.4 build (removed from npm)
1113- Fix #1733, #920, incorrect postgres array bindings
1114
1115# 0.12.3 - 9 Oct, 2016
1116
1117- Fix #1703, #1694 - connections should be returned to pool if acquireConnectionTimeout is triggered
1118- Fix #1710 regression in postgres array escaping
1119
1120# 0.12.2 - 27 Sep, 2016
1121
1122- Restore pool min: 1 for sqlite3, #1701
1123- Fix for connection error after it's closed / released, #1691
1124- Fix oracle prefetchRowCount setting, #1675
1125
1126# 0.12.1 - 16 Sep, 2016
1127
1128- Fix MSSQL sql execution error, #1669
1129- Added DEBUG=knex:bindings for debugging query bindings, #1557
1130
1131# 0.12.0 - 13 Sep, 2016
1132
1133- Remove build / built files, #1616
1134- Upgrade to Babel 6, #1617
1135- Reference Bluebird module directly, remove deprecated .exec method, #1618
1136- Remove documentation files from main repo
1137- Fix broken behavior on WebSQL build, #1638
1138- Oracle id sequence now handles manual inserts, #906
1139- Cleanup PG escaping, fix #1602, #1548
1140- Added [`with`](#Builder-with) to builder for [common table expressions](https://www.postgresql.org/docs/9.4/static/queries-with.html), #1599
1141- Fix #1619, pluck with explicit column names
1142- Switching back to [generic-pool](https://github.com/coopernurse/node-pool) for pooling resource management
1143- Removed index.html, please direct all PR's for docs against the files in [knex/documentation](https://github.com/knex/documentation)
1144
1145# 0.11.10 - 9 Aug, 2016
1146
1147- Added CHANGELOG.md for a [new documentation](https://github.com/knex/documentation) builder coming soon, #1615
1148- Minor documentation tweaks
1149- PG: Fix Uint8Array being considered undefined, #1601
1150- MSSQL: Make columnInfo schema dynamic, #1585
1151
1152# 0.11.9 - 21 Jul, 2016
1153
1154- Reverted knex client breaking change (commit b74cd69e906), fixes #1587
1155
1156# 0.11.8 - 21 Jul, 2016
1157
1158- Oracledb dialect #990
1159- Documentation fix #1532
1160- Allow named bindings to be escaped. #1576
1161- Several bugs with MS SQL schema creation and installing from gihub fix #1577
1162- Fix incorrect escaping of backslashes in SqlString.escape #1545
1163
1164# 0.11.7 - 19 Jun, 2016
1165
1166- Add missing dependency. #1516
1167
1168# 0.11.6 - 18 Jun, 2016
1169
1170- Allow cancellation on timeout (MySQL) #1454
1171- Better bigint support. (MSSQL) #1445
1172- More consistent handling of `undefined` values in `QueryBuilder#where` and `Raw`. #1459
1173- Fix Webpack build. #1447
1174- Fix code that triggered Bluebird warnings. #1460, #1489
1175- Fix `ping` function. (Oracle) #1486
1176- Fix `columnInfo`. (MSSQL) #1464
1177- Fix `ColumnCompiler#binary`. (MSSQL) #1464
1178- Allow connection strings that do not contain a password. #1473
1179- Fix race condition in seed stubs. #1493
1180- Give each query a UUID. #1510
1181
1182# 0.11.5 - 26 May, 2016
1183
1184- Bugfix: Using `Raw` or `QueryBuilder` as a binding to `Raw` now works as intended
1185
1186# 0.11.4 - 22 May, 2016
1187
1188- Bugfix: Inconsistency of `.primary()` and `.dropPrimary()` between dialects #1430
1189- Feature: Allow using custom Client/Dialect (you can pass your own client in knex config) #1428
1190- Docs: Add documentation for .dropTimestamps #1432
1191- Bugfix: Fixed passing undefined fields for insert/update inside transaction #1423
1192- Feature: `batchInsert` with existing transaction #1354
1193- Build: eslint instead of jshint #1416
1194- Bugfix: Pooled connections not releasing #1382
1195- Bugfix: Support passing `knex.raw` to `.whereNot` #1402
1196- Docs: Fixed list of dialects which supports `.returning` #1398
1197- Bugfix: rename table does not fail anymore even with schema defined #1403
1198
1199# 0.11.3 - 14 May, 2016
1200
1201- Support nested joins. #1397
1202
1203# 0.11.2 - 14 May, 2016
1204
1205- Prevent crash on `knex seed:make`. #1389
1206- Improvements to `batchInsert`. #1391
1207- Improvements to inserting `DEFAULT` with `undefined` binding. #1396
1208- Correct generated code for adding/dropping multiple columns. (MSSQL) #1401
1209
1210# 0.11.1 - 6 May, 2016
1211
1212- Fix error in CLI command `migrate:make`. #1386
1213
1214# 0.11.0 - 5 May, 2016
1215
1216### Breaking Changes:
1217
1218- `QueryBuilder#orWhere` joins multiple arguments with `AND`. #1164
1219
1220### Other Changes:
1221
1222- Collate for columns. (MySQL) #1147
1223- Add `QueryBuilder#timeout`, `Raw#timeout`. #1201 #1260
1224- Exit with error code when appropriate. #1238
1225- MSSQL connection accepts `host` as an alias for `server` in accordance with other dialects. #1239
1226- Add `query-response` event. #1231
1227- Correct behaviour of sibling nested transactions. #1226
1228- Support `RETURNING` with `UPDATE`. (Oracle) #1253
1229- Throwing callbacks from transactions automatically rolls them back. #1257
1230- Fixes to named `Raw` bindings. #1251
1231- `timestamps` accepts an argument to set `NOT NULL` and default to current timestamp.
1232- Add `TableBuilder#inherits` for PostgreSQL. #601
1233- Wrap index names. #1289
1234- Restore coffeescript knexfiles and configurations. #1292
1235- Add `andWhereBetween` and `andWhereNotBetween` #1132
1236- Fix `valueForUndefined` failure. #1269
1237- `renameColumn` no longer drops default value or nullability. #1326
1238- Correct MySQL2 error handling. #1315
1239- Fix MSSQL `createTableIfNotExists`. #1362
1240- Fix MSSQL URL parsing. #1342
1241- Update Lodash to 4.6.0 #1242
1242- Update Bluebird to 3.3.4 #1279
1243
1244# 0.10.0 - 15 Feb, 2016
1245
1246### Breaking Changes:
1247
1248- `insert` and `update` now ignore `undefined` values. Back compatibility is provided through the option `useNullAsDefault`. #1174, #1043
1249
1250### Other Changes:
1251
1252- Add [`countDistinct`](#Builder-countDistinct), [`avgDistinct`](#Builder-avgDistinct) and [`sumDistinct`](#Builder-sumDistinct). #1046
1253- Add [`schema.jsonb`](#Schema-jsonb). Deprecated `schema.json(column, true)`. #991
1254- Support binding identifiers with `??`. #1103
1255- Restore `query` event when triggered by transactions. #855
1256- Correct question mark escaping in rendered queries. #519, #1058
1257- Add per-dialect escaping, allowing quotes to be escaped correctly. #886, #1095
1258- Add MSSQL support. #1090
1259- Add migration locking. #1094
1260- Allow column aliases to contain `.`. #1181
1261- Add `batchInsert`. #1182
1262- Support non-array arguments to [`knex.raw`](#Raw-Bindings).
1263- Global `query-error` event. #1163
1264- Add `batchInsert`. #1182
1265- Better support for Mysql2 dialect options. #980
1266- Support for `acquireConnectionTimeout` default 60 seconds preventing #1040 from happening. #1177
1267- Fixed constraint name escaping when dropping a constraint. #1177
1268- Show also `.raw` queries in debug output. #1169
1269- Support for `cli` to use basic configuration without specific environment set. #1101
1270
1271# 0.9.0 - Nov 2, 2015
1272
1273- Fix error when merging `knex.raw` instances without arguments. #853
1274- Fix error that caused the connection to time out while streaming. #849
1275- Correctly parse SSL query parameter for PostgreSQL. #852
1276- Pass `compress` option to MySQL2. #843
1277- Schema: Use `timestamp with timezone` by default for `time`, `datetime` and `timestamp` for Oracle. #876
1278- Add [`QueryBuilder#modify`](#Builder-modify) #881
1279- Add LiveScript and Early Gray support for seeds and migrations.
1280- Add [`QueryBuilder#withSchema`](#Builder-withSchema) #518
1281- Allow escaping of `?` in `knex.raw` queries. #946
1282- Allow `0` in join clause. #953
1283- Add migration config to allow disabling/enabling transactions per migration. #834
1284
1285# 0.8.6 - May 20, 2015
1286
1287- Fix for several transaction / migration issues, #832, #833, #834, #835
1288
1289# 0.8.5 - May 14, 2015
1290
1291- Pool should be initialized if no pool options are specified
1292
1293# 0.8.4 - May 13, 2015
1294
1295- Pool should not be initialized if {max: 0} is sent in config options
1296
1297# 0.8.3 - May 2, 2015
1298
1299- Alias postgresql -> postgres in connection config options
1300
1301# 0.8.2 - May 1, 2015
1302
1303- Fix regression in using query string in connection config
1304
1305# 0.8.1 - May 1, 2015
1306
1307- Warn rather than error when implicit commits wipe out savepoints in mysql / mariadb, #805.
1308- Fix for incorrect seed config reference, #804
1309
1310# 0.8.0 - Apr 30, 2015
1311
1312### New Features:
1313
1314- Fixes several major outstanding bugs with the connection pool, switching to [Pool2](https://github.com/myndzi/pool2) in place of generic-pool-redux
1315- strong-oracle module support
1316- Nested transactions automatically become savepoints, with `commit` & `rollback` releasing or rolling back the current savepoint.
1317- Database seed file support, #391
1318- Improved support for sub-raw queries within raw statements
1319- Migrations are now wrapped in transactions where possible
1320- Subqueries supported in insert statements, #627
1321- Support for nested having, #572
1322- Support object syntax for joins, similar to "where" #743
1323
1324### Major Changes:
1325
1326- Transactions are immediately invoked as A+ promises, #470 (this is a feature and should not actually break anything in practice)
1327- Heavy refactoring internal APIs (public APIs should not be affected)
1328
1329### "Other Changes:
1330
1331- Allow mysql2 to use non-default port, #588
1332- Support creating & dropping extensions in PostgreSQL, #540
1333- CLI support for knexfiles that do not provide environment keys, #527
1334- Added sqlite3 dialect version of whereRaw/andWhereRaw (#477)
1335
1336# 0.7.5 - Mar 9, 2015
1337
1338- Fix bug in validateMigrationList, (#697)
1339
1340# 0.7.4 - Feb 25, 2015
1341
1342- Fix incorrect order of query parameters when using subqueries, #704
1343- Properly handle limit 0, (#655)
1344- Apply promise args from then instead of [explicitly passing](https://github.com/petkaantonov/bluebird/issues/482).
1345- Respect union parameter as last argument (#660).
1346- Added sqlite3 dialect version of whereRaw/andWhereRaw (#477).
1347- Fix SQLite dropColumn doesn't work for last column (#544).
1348- Add POSIX operator support for Postgres (#562)
1349- Sample seed files now correctly (#391)
1350
1351# 0.7.3 - Oct 3, 2014
1352
1353- Support for `join(table, rawOrBuilder)` syntax.
1354- Fix for regression in PostgreSQL connection (#516)
1355
1356# 0.7.2 - Oct 1, 2014
1357
1358- Fix for regression in migrations
1359
1360# 0.7.1 - Oct 1, 2014
1361
1362- Better disconnect handling & pool removal for MySQL clients, #452
1363
1364# 0.7.0 - Oct 1, 2014
1365
1366### New Features:
1367
1368- Oracle support, #419
1369- Database seed file support, #391
1370- Improved support for sub-raw queries within raw statements
1371
1372### Breaking Changes:
1373
1374- "collate nocase" no longer used by default in sqlite3 #396
1375
1376### Other Changes:
1377
1378- Bumping Bluebird to ^2.x
1379- Transactions in websql are now a no-op (unsupported) #375
1380- Improved test suite
1381- knex.fn namespace as function helper (knex.fn.now), #372
1382- Better handling of disconnect errors
1383- Support for offset without limit, #446
1384- Chainable first method for mysql schema, #406
1385- Support for empty array in `whereIn`
1386- Create/drop schema for postgres, #511
1387- Inserting multiple rows with default values, #468
1388- Join columns are optional for cross-join, #508
1389- Flag for creating jsonb columns in Postgresql, #500
1390
1391# 0.6.22 - July 10, 2014
1392
1393- Bug fix for properly binding postgresql streaming queries, (#363)
1394
1395# 0.6.21 - July 9, 2014
1396
1397- Bug fix for raw queries not being transaction context aware, (#351).
1398- Properly forward stream errors in sqlite3 runner, (#359)
1399
1400# 0.6.20 - June 30, 2014
1401
1402- Allow case insensitive operators in sql clauses, (#344)
1403
1404# 0.6.19 - June 27, 2014
1405
1406- Add `groupByRaw` / `orderByRaw` methods, better support for raw statements in group / order (#282).
1407- Support more config options for node-mysql2 dialect (#341).
1408- CLI help text fix, (#342)
1409
1410# 0.6.18 - June 25, 2014
1411
1412- Patch for the method, calling without a handler should return the stream, not a promise (#337)
1413
1414# 0.6.17 - June 23, 2014
1415
1416- Adding missing map / reduce proxies to bluebird's implementation
1417
1418# 0.6.16 - June 18, 2014
1419
1420- Increment / decrement returns the number of affectedRows (#330).
1421- Allow --cwd option flag to be passed to CLI tool (#326)
1422
1423# 0.6.15 - June 14, 2014
1424
1425- Added the as method for aliasing subqueries
1426
1427# 0.6.14 - June 14, 2014
1428
1429- whereExists / whereNotExists may now take a query builder instance as well as a callback
1430
1431# 0.6.13 - June 12, 2014
1432
1433- Fix regression with onUpdate / onDelete in PostgreSQL, (#308).
1434- Add missing `Promise` require to knex.js, unit test for knex.destroy (#314)
1435
1436# 0.6.12 - June 10, 2014
1437
1438- Fix for regression with boolean default types in PostgreSQL
1439
1440# 0.6.11 - June 10, 2014
1441
1442- Fix for regression with queries containing multiple order by statements in sqlite3
1443
1444# 0.6.10 - June 10, 2014
1445
1446- Fix for big regression in memoization of column names from 0.5 -> 0.6
1447
1448# 0.6.9 - June 9, 2014
1449
1450- Fix for regression in specificType method
1451
1452# 0.6.8 - June 9, 2014
1453
1454- Package.json fix for CLI
1455
1456# 0.6.7 - June 9, 2014
1457
1458- Adds support for [node-mysql2](https://github.com/sidorares/node-mysql2) library.
1459- Bundles CLI with the knex install, various related migrate CLI fixes
1460
1461# 0.6.6 - June 9, 2014
1462
1463- console.warn rather than throw when adding foreignKeys in SQLite3.
1464- Add support for dropColumn in SQLite3.
1465- Document `raw.wrap`
1466
1467# 0.6.5 - June 9, 2014
1468
1469- Add missing \_ require to WebSQL builds
1470
1471# 0.6.4 - June 9, 2014
1472
1473- Fix & document schema.raw method
1474
1475# 0.6.3 - June 6, 2014
1476
1477- Schema methods on transaction object are now transaction aware (#301).
1478- Fix for resolved value from transactions, (#298).
1479- Undefined columns are not added to builder
1480
1481# 0.6.2 - June 4, 2014
1482
1483- Fix regression in raw query output, (#297).
1484- Fix regression in "pluck" method (#296).
1485- Document [first](#Builder-first) method
1486
1487# 0.6.1 - June 4, 2014
1488
1489- Reverting to using .npmignore, the "files" syntax forgot the knex.js file
1490
1491# 0.6.0 - June 4, 2014
1492
1493### Major Library refactor:
1494
1495- Major internal overhaul to clean up the various dialect code.
1496- Improved unit test suite.
1497- Support for the [mariasql](https://github.com/mscdex/node-mariasql) driver.
1498- More consistent use of raw query bindings throughout the library.
1499- Queries are more composable, may be injected in various points throughout the builder.
1500- Added [streaming](#Interfaces-Streams) interface
1501- Deprecated 5 argument [join](#Builder-join) in favor of additional join methods.
1502- The wrapValue function to allow for array column operations in PostgreSQL (#287).
1503- An explicit connection can be passed for any query (#56).
1504- Drop column support for sqlite3
1505- All schema actions are run sequentially on the same connection if chained.
1506- Schema actions can now be wrapped in a transaction
1507- `.references(tableName.columnName)` as shorthand for `.references(columnName).inTable(tableName)`
1508- `.join('table.column', 'otherTable.column')` as shorthand for .join('table.column', '=', 'otherTable.column')
1509- Streams are supported for selects, passing through to the streaming capabilities of node-mysql and node-postgres
1510- For More information, see this [pull-request](https://github.com/tgriesser/knex/pull/252)
1511
1512# 0.5.15 - June 4, 2014
1513
1514- Dropped indexes feature now functions correctly, (#278)
1515
1516# 0.5.14 - May 6, 2014
1517
1518- Remove the charset encoding if it's utf8 for mysql, as it's the default but also currently causes some issues in recent versions of node-mysql
1519
1520# 0.5.13 - April 2, 2014
1521
1522- Fix regression in array bindings for postgresql (#228)
1523
1524# 0.5.12 - Mar 31, 2014
1525
1526- Add more operators for where clauses, including && (#226)
1527
1528# 0.5.11 - Mar 25, 2014
1529
1530- `.where(col, 'is', null)` or `.where(col, 'is not', null)` are not supported (#221).
1531- Case insensitive `where` operators now allowed (#212).
1532- Fix bug in increment/decrement truncating to an integer (#210).
1533- Disconnected connections are now properly handled & removed from the pool (#206).
1534- Internal tweaks to binding concatenations for performance (#207)
1535
1536# 0.5.10 - Mar 19, 2014
1537
1538- Add the .exec method to the internal promise shim
1539
1540# 0.5.9 - Mar 18, 2014
1541
1542- Remove error'ed connections from the connection pool (#206), added support for node-postgres-pure (pg.js) (#200)
1543
1544# 0.5.8 - Feb 27, 2014
1545
1546- Fix for chaining on forUpdate / forShare, adding map & reduce from bluebird
1547
1548# 0.5.7 - Feb 18, 2014
1549
1550- Fix for a null limit / offset breaking query chain (#182)
1551
1552# 0.5.6 - Feb 5, 2014
1553
1554- Bump bluebird dependency to ~1.0.0, fixing regression in Bluebird 1.0.2 (#176)
1555
1556# 0.5.5 - Jan 28, 2014
1557
1558- Fix for the exit code on the migrations cli (#151).
1559- The `init` method in `knex.migrate` now uses `this.config` if one isn't passed in (#156)
1560
1561# 0.5.4 - Jan 7, 2014
1562
1563- Fix for using raw statements in defaultTo schema builder methods (#146)
1564
1565# 0.5.3 - Jan 2, 2014
1566
1567- Fix for incorrectly formed sql when aggregates are used with columns (#144)
1568
1569# 0.5.2 - Dec 18, 2013
1570
1571- Adding passthrough "catch", "finally" to bluebird implementations, use bluebird's "nodeify" internally for exec
1572
1573# 0.5.1 - Dec 12, 2013
1574
1575- The [returning](#Builder-returning) in PostgreSQL may now accept \* or an array of columns to return. If either of these are passed, the response will be an array of objects rather than an array of values. Updates may also now use a `returning` value. (#132)
1576- Added `bigint` and `bigserial` type to PostgreSQL. (#111)
1577- Fix for the [specificType](#Schema-specificType) schema call (#118)
1578- Several fixes for migrations, including migration file path fixes, passing a Promise constructor to the migration `up` and `down` methods, allowing the "knex" module to be used globally, file ordering on migrations, and other small improvements. (#112-115, #125, #135)
1579
1580# 0.5.0 - Nov 25, 2013
1581
1582- Initial pass at a [migration](#Migrations) api.
1583- Aggregate methods are no longer aliased as "aggregate", but may now be aliased and have more than one aggregate in a query (#108, #110).
1584- Adding bigint and bigserial to PostgreSQL (#111).
1585- Bugfix on increment/decrement values (#100).
1586- Bugfix with having method (#107).
1587- Switched from when.js to [bluebird](https://github.com/petkaantonov/bluebird) for promise implementation, with shim for backward compatibility.
1588- Switched from underscore to lodash, for semver reliability
1589
1590# 0.4.13 - Oct 31, 2013
1591
1592- Fix for aggregate methods on toString and clone, (#98)
1593
1594# 0.4.12 - Oct 29, 2013
1595
1596- Fix incorrect values passed to float in MySQL and decimal in PostgreSQL
1597
1598# 0.4.11 - Oct 15, 2013
1599
1600- Fix potential sql injection vulnerability in orderBy, thanks to @sebgie
1601
1602# 0.4.10 - Oct 14, 2013
1603
1604- Added [forUpdate](#Builder-forUpdate) and [forShare](#Builder-forShare) for select modes in transactions. (#84)
1605- Fix bug where current query chain type is not copied on [clone](#Builder-clone). (#90)
1606- Charset and collate are now added as methods on the schema builder. (#89)
1607- Added `into` as an alias of [from](#Builder-from), for builder syntax of: `insert(value).into(tableName)`
1608- Internal pool fixes. (#90)
1609
1610# 0.4.9 - Oct 7, 2013
1611
1612- Fix for documentation of [hasColumn](#Schema-hasColumn), ensure that `hasColumn` works with MySQL (#87).
1613- More cleanup of error messages, showing the original error message concatenated with the sql and bindings
1614
1615# 0.4.8 - Oct 2, 2013
1616
1617- Connections are no longer pushed back into the pool if they never existed to begin with (#85)
1618
1619# 0.4.7 - Sep 27, 2013
1620
1621- The column is now a documented method on the builder api, and takes either an individual column or an array of columns to select
1622
1623# 0.4.6 - Sep 25, 2013
1624
1625- Standardizing handling of errors for easier debugging, as noted in (#39)
1626
1627# 0.4.5 - Sep 24, 2013
1628
1629- Fix for hasTable always returning true in MySQL (#82), fix where sql queries were duplicated with multiple calls on toSql with the schema builder
1630
1631# 0.4.4 - Sep 22, 2013
1632
1633- Fix for debug method not properly debugging individual queries
1634
1635# 0.4.3 - Sep 18, 2013
1636
1637- Fix for underscore not being defined in various grammar files
1638
1639# 0.4.2 - Sep 17, 2013
1640
1641- Fix for an error being thrown when an initialized ClientBase instance was passed into Knex.initialize. pool.destroy now optionally accepts a callback to notify when it has completed draining and destroying all connections
1642
1643# 0.4.1 - Sep 16, 2013
1644
1645- Cleanup from the 0.4.0 release, fix a potential exploit in "where" clauses pointed out by Andri Möll, fix for clients not being properly released from the pool #70, fix for where("foo", "<>", null) doing an "IS NULL" statement
1646
1647# 0.4.0 - Sep 13, 2013
1648
1649### Breaking Changes:
1650
1651- Global state is no longer stored in the library, an instance is returned from `Knex.initialize`, so you will need to call this once and then reference this `knex` client elsewhere in your application.
1652- Lowercasing of `knex.raw`, `knex.transaction`, and `knex.schema`.
1653- Created columns are now nullable by default, unless `notNullable` is chained as an option.
1654- Keys created with `increments` are now assumed to be unsigned (MySQL) by default.
1655- The `destroyAllNow` is no longer called by the library on `process.exit` event. If you need to call it explicitly yourself, you may use `knex.client.destroyPool`
1656
1657# 0.2.6 - Aug 29, 2013
1658
1659- Reject the transaction promise if the transaction "commit" fails, (#50)
1660
1661# 0.2.5 - Aug 25, 2013
1662
1663- Fix error if a callback isn't specified for exec, (#49)
1664
1665# 0.2.4 - Aug 22, 2013
1666
1667- Fix SQLite3 delete not returning affected row count, (#45)
1668
1669# 0.2.3 - Aug 22, 2013
1670
1671- Fix insert with default values in PostgreSQL and SQLite3, (#44)
1672
1673# 0.2.2 - Aug 20, 2013
1674
1675- Allowing Raw queries to be passed as the primary table names
1676
1677# 0.2.1 - Aug 13, 2013
1678
1679- Fix for an array passed to insert being mutated
1680
1681# 0.2.0 - Aug 7, 2013
1682
1683### Breaking changes:
1684
1685- [hasTable](#Schema-hasTable) now returns a boolean rather than a failed promise.
1686- Changed syntax for insert in postgresql, where the `id` is not assumed on inserts (#18). The second parameter of [insert](#Builder-insert) is now required to return an array of insert id's for the last insert.
1687- The [timestamp](#Schema-timestamp) method on the schema builder now uses a `dateTime` rather than a `timestamp`
1688
1689# 0.1.8 - July 7, 2013
1690
1691- Somehow missing the != operator. Using _.find rather than _.where in getCommandsByName(#22)
1692
1693# 0.1.7 - June 12, 2013
1694
1695- Ensures unhandled errors in the exec callback interface are re-thrown
1696
1697# 0.1.6 - June 9, 2013
1698
1699- Renaming beforeCreate to afterCreate. Better handling of errors in the connection pooling
1700
1701# 0.1.5 - June 9, 2013
1702
1703- Added the ability to specify beforeCreate and beforeDestroy hooks on the initialize's options.pool to perform any necessary database setup/teardown on connections before use (#14). where and having may now accept Knex.Raw instances, for consistency (#15). Added an orHaving method to the builder. The ability to specify bindings on Raw queries has been removed
1704
1705# 0.1.4 - May 22, 2013
1706
1707- defaultTo now accepts "false" for boolean columns, allows for empty strings as default values
1708
1709# 0.1.3 - May 18, 2013
1710
1711- Enabling table aliases (#11). Fix for issues with transactions not functioning (#12)
1712
1713# 0.1.2 - May 15, 2013
1714
1715- Bug fixes for groupBy (#7). Mysql using collation, charset config settings in createTable. Added engine on schemaBuilder specifier (#6). Other doc fixes, tests
1716
1717# 0.1.1 - May 14, 2013
1718
1719- Bug fixes for sub-queries, minor changes to initializing "main" instance, adding "pg" as a valid parameter for the client name in the connection settings
1720
1721# 0.1.0 - May 13, 2013
1722
1723- Initial Knex release