UNPKG

76.8 kBMarkdownView Raw
1# Master (Unreleased)
2
3# 3.1.0 - 8 December, 2023
4
5### Bug fixes
6
7- andWhereNotJsonObject calling wrong function (#5683)
8- PostgreSQL: fix error when setting query_timeout (#5673)
9- MySQL: Missing comments on delete, update and insert (#5738)
10- MySQL: Fixed issue with bigincrements not working with composite primary key - #5341 (#5343)
11
12### Types
13
14- Add type definitions for orHavingNull and orHavingNotNull (#5669)
15- Import knex as type in TS migration template (#5741)
16- Fix conditional constraint error (#5747)
17- PostgreSQL: Fix typing to reflect pg typing change (#5647)
18
19### New features
20
21- Add transactor.parentTransaction (#5567)
22- MySQL: Added implementation for upsert (#5743)
23- Oracle: Support Object Names Greater than 30 Characters for Oracle DB Versions 12.2 and Greater (#5197)
24
25# 3.0.1 - 6 October, 2023
26
27- Build fix
28
29# 3.0.0 - 6 October, 2023
30
31- Fix raw bindings typing (#5401)
32- Fix migrate:unlock when used with custom identifier wrapping. (#5353)
33- Fix driver options specified with .options() method being ignored for oracledb dialect (#5123)
34- Drop compatibility for Node < 16
35- Fix knex d.ts to work with mixed modules (#5659)
36- Fix Lexical error from "Instaed" to "Instead" (#5655)
37
38### Bug fixes
39
40- Fix Linting #5455 - #5460
41
42# 2.5.1 - 12 July, 2023
43
44### Bug fixes
45
46- Fix Linting #5455 - #5460
47
48# 2.5.0 - 08 July, 2023
49
50### New features
51
52- Add uuid helper function (#5617)
53- Add `nativeBindings` option to `better-sqlite3` options (#5461)
54- Add QueryBuilder#updateFrom (#5386)
55- Add readonly transaction access mode (#5445)
56- Add readonly option to Better-SQLite3 (#5530)
57- Add EXCEPT as a valid keyword (#5357)
58- Add ability to prepend query comments (#5289)
59- Add fetchAsString option (#5484)
60
61### Bug fixes
62
63- Avoid password leaks on query logs (#5559)
64- Add knex.mjs to files in package.json (#5518)
65- Handle numeric array elements in .orderBy() (#5551)
66- Attach error handler early enough (#5552)
67- Fix Returning \* in Oracle (#5598)
68- Fix indexType option in `Postgres` (#5601)
69- Add mjs extension type (#5616)
70- Use implicit check on json fields for OracleDB (#5478)
71- Fix when manually close source stream (#5466)
72- Fix case sensitive issue with get table (#5509)
73
74### Typings
75
76- Add Object syntax overload to increment method (#5512)
77- Add object syntax overload to decrement method (#5555)
78- Fix typing for toSql (#5594)
79- Add ResolveTableType for `.merge()` (#5605)
80- Add missing types for havingNull and havingNotNull (#5529)
81- Add collate to the columnbuilder interface (#5568)
82- TableBuilder methods return the SchemaBuilder. (#5486)
83
84# 2.4.2 - 22 January, 2023
85
86### Bug fixes
87
88- CLI: Fix incorrent EOL causing errors on Linux #5455
89
90# 2.4.1 - 18 January, 2023
91
92### Bug fixes
93
94- PostgreSQL: Fix Malformed array literal 2.4.0 Regression #5439
95
96# 2.4.0 - 06 January, 2023
97
98### New features:
99
100- Support partial unique indexes #5316
101- Make compiling SQL in error message optional #5282
102
103### Bug fixes
104
105- Insert array into json column #5321
106- Fix unexpected max acquire-timeout #5377
107- Fix: orWhereJson #5361
108- MySQL: Add assertion for basic where clause not to be object or array #1227
109- SQLite: Fix changing the default value of a boolean column in SQLite #5319
110
111### Typings:
112
113- add missing type for 'expirationChecker' on PgConnectionConfig #5334
114
115# 2.3.0 - 31 August, 2022
116
117### New features:
118
119- PostgreSQL: Explicit jsonb support for custom pg clients #5201
120- SQLite: Support returning with sqlite3 and better-sqlite3 #5285
121- MSSQL: Implement mapBinding mssql dialect option #5292
122
123### Typings:
124
125- Update types for TS 4.8 #5279
126- Fix typo #5267
127- Fix WhereJsonObject withCompositeTableType #5306
128- Fix AnalyticFunction type #5304
129- Infer specific column value type in aggregations #5297
130
131# 2.2.0 - 19 July, 2022
132
133### New features:
134
135- Inline primary key creation for postgres flavours #5233
136- SQLite: Add warning for undefined connection file #5223
137- MSSQL: Add JSON parameter support for connection #5200
138
139### Bug fixes:
140
141- PostgreSQL: add primaryKey option for uuid #5212
142
143### Typings:
144
145- Add promisable and better types #5222
146- Update raw query bind parameter type #5208
147
148# 2.1.0 - 26 May, 2022
149
150### New features:
151
152- Improve bundling experience to safely import dialects while using static paths #5142
153- Implement extendable builders #5041
154- PostgreSQL: Refresh materialized view concurrently #5166
155
156### Bug fixes:
157
158- Use correct paths in package.json browser field #5174
159- MariaDB: Fix 'NULL' returned instead of NULL on MariaDB 10.2.6+ #5181
160- MySQL: fix hasColumn Error (hasColumn ('a_id') is true, but hasColumn('a_Id') is false) #5148
161- MSSQL: Fix .hasTable result when using .withSchema #5176
162- Oracle: correctly INSERTS Buffer #4869
163
164### Typings:
165
166- Update type definitions for pg connection #5139
167
168# 2.0.0 - 21 April, 2022
169
170### Breaking changes
171
172- Restore sqlite3 package #5136
173
174### Test / internal changes:
175
176- Migrate Husky from 4 to 7 #5137
177- Migrate Jake to 10.8.5 #5138
178
179# 1.0.7 - 13 April, 2022
180
181### Bug fixes:
182
183- CLI: Fix cli migrate:make SQLite dependency #5106
184
185# 1.0.6 - 12 April, 2022
186
187### Bug fixes:
188
189- PostgreSQL: Wait for search path to be set before returning connection #5107
190- CLI: No client override during migrate:make #5109
191
192# 1.0.5 - 05 April, 2022
193
194### New features:
195
196- Override knexfile options with CLI options #4047
197
198### Bug fixes:
199
200- Stringify json value in update #5063
201- Fix isModuleType() for yarn #4447
202- Wrapped Unions Fixes #5072
203- SQLite: Fix @vscode-sqlite3 error message #5081
204- CLI: Fix completed migration listing #5060
205
206### Typings:
207
208- Make default generic parameters of `Knex` match the generic parameter types of `knex` #5021
209- Update knex types for TS 4.7 #5095
210
211# 1.0.4 - 13 March, 2022
212
213### New features:
214
215- Add whereLike functions #5044
216
217### Bug fixes:
218
219- Fix orWhereJsonPath clause #5022
220- Subquery in on clause missing parenthesis #5049
221- Rework Union Wrapping #5030
222- Oracle: Fix batch inserts with DEFAULT values with OracleDB #2592 #5037
223
224### Typings:
225
226- Fix types for "returning" methods #5031
227- createTableLike callback should be optional #5055
228
229### Documentation:
230
231- Website URL changed to https://knex.github.io/documentation/
232
233# 1.0.3 - 11 February, 2022
234
235### Bug fixes:
236
237- Fix error message for missing migration files #4937
238- Add withMaterialized and withNotMaterialized to method-constants #5009
239- PostgreSQL: Fix whereJsonPath queries #5011
240- PostgreSQL: Fix delete joins #5016
241- CockroachDB: Fix whereJsonPath queries #5011
242- MySQL: Create primary keys in same statement #5017
243
244### Typings:
245
246- Fix type definition for getMigration in MigrationSource #4998
247- Fix argument type of alter method #4996
248
249### Improvements:
250
251- Use async / await syntax in seeds as default #5005
252
253### Documentation:
254
255- Add Firebird dialect to ECOSYSTEM.md #5003
256
257# 1.0.2 - 02 February, 2022
258
259### New features:
260
261- Support of MATERIALIZED and NOT MATERIALIZED with WITH/CTE #4940
262- Add raw support in onConflict clause #4960
263- Alter nullable constraint when alterNullable is set to true #4730
264- Add alterType parameter for alter function #4967
265- Support string json in json values #4988
266- MySQL: add with clause #4508
267
268### Bug fixes:
269
270- Fix error message for missing migration files #4937
271- Move deferrable to after on update/on delete #4976
272- Do not use sys.tables to find if a table exists #2328
273- PostgreSQL: Fix Order nulls #4989
274- MySQL: Fix collation when renaming column #2666
275- SQLite: Same boolean handling in better-sqlite3 as in sqlite3 #4982
276
277### Typings:
278
279- WhereILike - fix typo #4941
280
281# 1.0.1 - 16 January, 2022
282
283### Bug fixes:
284
285- Fix package.json metadata
286
287# 1.0.0 - 16 January, 2022
288
289### Breaking changes
290
291- Dropped support for Node 10;
292- Replaced unsupported `sqlite3` driver with `@vscode/sqlite3`;
293- Changed data structure from `RETURNING` operation to be consistent with `SELECT`;
294- Changed Migrator to return list of migrations as objects consistently.
295
296### New features:
297
298- Support fromRaw #4781
299- Support zero precision in timestamp/datetime #4784
300- Support whereLike and whereILike #4779
301- Add JSDoc (TS flavor) to stub files #4809
302- Allow skip binding in limit and offset #4811
303- Support creating a new table in the database based on another table #4821
304- Accept Raw on onIn joins #4830
305- Implement support for custom seed sources #4842
306- Add binary uuid option #4836
307- ForUpdate array parameter #4882
308- Add camel case to timestamps method #4803
309- Advanced JSON support #4859
310- Add type to TypeScript knexfile #4909
311- Checks Constraints Support #4874
312- Support creating multiple PKs with increments #4903
313- Enable wrapIdentifier for SQLite .hasTable #4915
314- MSSQL: Add support for unique constraint #4887
315- SQLite: New dialect, using better-sqlite3 driver #4871
316- SQLite: Switch to @vscode/sqlite3 #4866
317- SQLite: Support createViewOrReplace #4856
318- SQLite: Support RETURNING statements for better-sqlite3 driver #4934
319- PostgreSQL: Support JOIN and USING syntax for Delete Statement #4800
320
321### Bug fixes:
322
323- Fix overzealous warning on use of whereNot with "in" or "between" #4780
324- Fix Union all + first syntax error #4799
325- Make view columns optional in create view like #4829
326- Insert lock row fix during migration #4865
327- Fix for createViewOrReplace #4856
328- SQLite: Fix foreign key constraints when altering a table #4189
329- MySQL: Validate connection fix #4794
330- MySQL: Set comment size warning limit to 1024 #4867
331
332### Typings:
333
334- Allow string indexType in index creation #4791
335- Add missing ints typings #4832
336- Returning method types #4881
337- Improve columnInfo type #4868
338
339# 0.95.15 - 22 December, 2021
340
341### Bug fixes:
342
343- Oracle:
344- MariaDB: lock row fix during migration in MariaDB and Oracle #4865
345
346# 0.95.14 - 09 November, 2021
347
348### Bug fixes:
349
350- MySQL: mysql2 dialect validate connection fix #4794
351
352# 0.95.13 - 02 November, 2021
353
354### Bug fixes:
355
356- PostgreSQL: Support zero precision in timestamp/datetime #4784
357
358### Typings:
359
360- Allow string indexType in index creation #4791
361
362# 0.95.12 - 28 October, 2021
363
364### New features:
365
366- New dialect: CockroachDB #4742
367- New dialect: pg-native #4327
368- CockroachDB: add support for upsert #4767
369- PostgreSQL: Support SELECT .. FOR NO KEY UPDATE / KEY SHARE row level locking clauses #4755
370- PostgreSQL: Add support for 'CASCADE' in PostgreSQL 'DROP SCHEMA' queries #4713
371- MySQL: Add storage engine index Type support to index() and unique() schema #4756
372- MSSQL: Support table.primary, table.unique variant with options object #4710
373- SQLite: Add setNullable support to SQLite #4684
374- Add geometry column building #4776
375- Add support for creating table copies #1373
376- Implement support for views and materialized views #1626
377- Implement partial index support #4768
378- Support for 'is null' in 'order by' #3667
379
380### Bug fixes:
381
382- Fix support for Oracle connections passed via knex.connection() #4757
383- Avoid inserting multiple locks if a migration lock already exists #4694
384
385### Typings:
386
387- Some TableBuilder methods return wrong types #4764
388- Update JoinRaw bindings type to accept arrays #4752
389- fix onDelete/onUpdate for ColumnBuilder #4656
390
391# 0.95.11 - 03 September, 2021
392
393### New features:
394
395- Add support for nullability modification via schema builder (table.setNullable() and table.dropNullable()) #4657
396- MySQL: Add support for mysql/mariadb-client JSON parameters in connectionURIs #4629
397- MSSQL: Support comments as MS_Description properties #4632
398
399### Bug fixes:
400
401- Fix Analytic orderBy and partitionBy to follow the SQL documentation #4602
402- CLI: fix migrate:up for migrations disabling transactions #4550
403- SQLite: Fix adding a column with a foreign key constraint in SQLite #4649
404- MSSQL: columnInfo() support case-sensitive database collations #4633
405- MSSQL: Generate valid SQL for withRecursive() #4514
406- Oracle: withRecursive: omit invalid RECURSIVE keyword, include column list #4514
407
408### Improvements:
409
410- Add .mjs migration and seed stubs #4631
411- SQLite: Clean up DDL handling and move all operations to the parser-based approach #4648
412
413# 0.95.10 - 20 August, 2021
414
415### Improvements:
416
417- Use sys info function instead of connection db name #4623
418
419### Typings:
420
421- Deferrable and withkeyName should not be in ColumnBuilder #4600
422
423# 0.95.9 - 31 July, 2021
424
425### New features:
426
427- Oracle: support specifying schema for dropTable and dropSequence #4596
428- Oracle: support specifying schema for autoincrement #4594
429
430### Typings:
431
432- Add TypeScript support for deferrable, new Primary/Unique syntax #4589
433
434# 0.95.8 - 25 July, 2021
435
436### New features:
437
438- Add deferrable support for constraint #4584
439- Implement delete with join #4568
440- Add DPI error codes for Oracle #4536
441
442### Bug fixes:
443
444- Fixing PostgreSQL datetime and timestamp column created with wrong format #4578
445
446### Typings:
447
448- Improve analytic types #4576
449- MSSQL: Add trustServerCertificate option #4500
450
451# 0.95.7 - 10 July, 2021
452
453### New features:
454
455- Add ability to omit columns on an onConflict().ignore() #4557
456- CLI: Log error message #4534
457
458### Typings:
459
460- Export Knex.TransactionConfig #4498
461- Include options object in count(Distinct) typings #4491
462- Add types for analytic functions #4544
463
464# 0.95.6 - 17 May, 2021
465
466### Typings:
467
468- Export TransactionProvider type #4489
469
470# 0.95.5 - 11 May, 2021
471
472### New features:
473
474- SQLite: Add support for file open flags #4446
475- Add .cjs extension to Seeder.js to support Node ESM #4381 #4382
476
477### Bug fixes:
478
479- Remove peerDependencies to avoid auto-install on npm 7 #4480
480
481### Typings:
482
483- Fix typing for increments and bigIncrements #4406
484- Add typings for on JoinClause for onVal #4436
485- Adding Type Definition for isTransaction #4418
486- Export client class from knex namespace #4479
487
488# 0.95.4 - 26 March, 2021
489
490### Typings:
491
492- Fix mistyping of stream #4400
493
494# 0.95.3 - 25 March, 2021
495
496### New features:
497
498- PostgreSQL: Add "same" as operator #4372
499- MSSQL: Improve an estimate of the max comment length #4362
500- Throw an error if negative offset is provided #4361
501
502### Bug fixes:
503
504- Fix timeout method #4324
505- SQLite: prevent dropForeign from being silently ignored #4376
506
507### Typings:
508
509- Allow config.client to be non-client instance #4367
510- Add dropForeign arg type for single column #4363
511- Update typings for TypePreservingAggregation and stream #4377
512
513# 0.95.2 - 11 March, 2021
514
515### New features:
516
517- Improve ESM import support #4350
518
519### Bug fixes:
520
521- CLI: update ts.stub files to new TypeScript namespace #4344
522- CLI: fix TypeScript migration stub after 0.95.0 changes #4366
523
524### Typings:
525
526- Move QueryBuilder and KnexTimeoutError into knex namespace #4358
527
528### Test / internal changes:
529
530- Unify db test helpers #4356
531
532# 0.95.1 - 04 March, 2021
533
534### Bug fixes:
535
536- CLI: fix `knex init` not finding default knexfile #4339
537
538# 0.95.0 - 03 March, 2021
539
540Note: there are many breaking changes in this version, particularly in TypeScript support. Please see `UPGRADING.md` for details.
541
542### New features:
543
544- Add transaction isolation support #4185
545- Add analytic functions #4188
546- Change default to not trigger a promise rejection for transactions with a specified handler #4195
547- Make toSQL().toNative() work for Raw to match the API for QueryBuilder #4058
548- Allow 'match' operator #3569
549- Support optimizer hints #4243
550- Add parameter to prevent autoincrement columns from being primary keys #4266
551- Make "first" and "pluck" mutually exclusive #4280
552- Added merge strategy to allow selecting columns to upsert. #4252
553- Throw error if the array passed to insert is empty #4289
554- Events: introduce queryContext on query-error #4301
555- CLI: Use UTC timestamp for new migrations #4245
556- MSSQL: Replace MSSQL dialect with Tedious.js implementation #2857 #4281
557- MSSQL: Use "nvarchar(max)" for ".json()" #4278
558- MSSQL: Schema builder - add predictable constraint names for default values #4319
559- MSSQL: Schema builder - attempt to drop default constraints when changing default value on columns #4321
560- SQLite: Fallback to json for sqlite3 when using jsonb #4186
561- SQLite: Return complete list of DDL commands for creating foreign keys #4194
562- SQLite: Support dropping composite foreign keys #4202
563- SQLite: Recreate indices when altering a table #4277
564- SQLite: Add support for altering columns #4322
565
566### Bug fixes:
567
568- Fix issue with .withSchema usage with joins on a subquery #4267
569- Fix issue with schema usage with FROM clause contain QueryBuilder, function or Raw #4268
570- CLI: Address raised security warnings by dropping liftoff #4122
571- CLI: Fix an issue with npm@7 and ESM when `type` was set to `'module'` in `package.json` #4295
572- PostgreSQL: Add check to only create native enum once #3658
573- SQLite: Fix foreign key "on delete" when altering a table #4225
574- SQLite: Made the constraint detection case-insensitive #4330
575- MySQL: Keep auto increment after rename #4266
576- MSSQL: don't raise query-error twice #4314
577- MSSQL: Alter column must have its own query #4317
578
579### Typings:
580
581- TypeScript 4.1+ is now required
582- Add missing onConflict overrides #4182
583- Introduce the "infamous triplet" export #4181
584- Fix type definition of Transaction #4172
585- Add typedefinitions for havingNotIn #4265
586- Include 'name' property in MigratorConfig #4300
587- Improve join and conflict types #4318
588- Fix ArrayIfAlready type #4331
589
590### Test / internal changes:
591
592- Drop global Knex.raw #4180
593- Stop using legacy url.parse API #3702
594- Various internal refactorings #4175 #4177 #4178 #4192
595- Refactor to classes #4190 #4191 #4193 #4210 #4253
596- Move transaction type tests to TSD #4208
597- Clean up destroy logic #4248
598- Colorize code snippets in readme files #4234
599- Add "Ecosystem" documentation for Knex plugins #4183
600- Documentation cleanup
601- SQLite: Use SQLite "rename column" instead of a DDL helper #4200
602- SQLite: Simplify reinsert logic when altering a table #4272
603
604# 0.21.19 - 02 March, 2021
605
606- SQLite: Made the constraint detection case-insensitive #4332
607
608# 0.21.18 - 22 February, 2021
609
610- CLI: Fix an issue with npm@7 and ESM when type was set to 'module' in package.json #4295
611
612# 0.21.17 - 30 January, 2021
613
614### Bug fixes:
615
616- SQLite: Fix SQLite foreign on delete when altering a table #4261
617
618### New features:
619
620- Add support for optimizer hints (see https://github.com/knex/documentation/pull/306 for documentation) #4243
621
622# 0.21.16 - 17 January, 2021
623
624### Bug fixes:
625
626- MSSQL: Avoid passing unsupported pool param. Fixes node-mssql 7+ support #4236
627
628# 0.21.15 - 26 December, 2020
629
630### New features:
631
632- SQLite: Add primary/foreign support on alterTable #4162
633- SQLite: Add dropPrimary/dropForeign support on alterTable #4162
634
635### Typings:
636
637- Add "after" and "first" to columnBuilder types #3549 #4169
638
639### Test / internal changes:
640
641- Extract knex config resolution logic #4166
642- Run CI using GitHub Actions #4168
643- Add Node.js 15 to CI matrix #4173
644
645# 0.21.14 - 18 December, 2020
646
647### New features:
648
649- MSSQL: support "returning" on inserts, updates and deletes on tables with triggers #4152
650- Use esm import if package.json type is "module" #4158
651
652### Bug fixes:
653
654- Make sure query-response and query-error events contain \_knexTxId #4160
655
656### Test / internal changes:
657
658- Improved integration test framework #4161
659
660# 0.21.13 - 12 December, 2020
661
662### New features:
663
664- SQLite: Add support for `dropForeign` #4092
665- Add support for WHERE clauses to "upsert" queries #4148
666
667### Bug fixes:
668
669- MSSQL: Avoid connection getting stuck on socket hangup #4157
670- Oracle: Support specifying non-default DB port #4147
671- Oracle: Support inserts with only default values (empty body) #4092
672- CLI: fix irregular seed file execution order #4156
673- Fix performance of asyncStackTraces with enable-source-maps node flag #4154
674
675### Typings:
676
677- PostgreSQL: Add support for application_name #4153
678- Fix types for insert to allow array #4105
679- Add types for userParams and withUserParams #4119
680- Added type for withKeyName #4139
681- Fix batchInsert definitions #4131
682- Fix types for WhereIn signature (value or query builder) #3863
683- Add types for connection config of mysql2 driver #4144
684
685### Test / internal changes:
686
687- Move TS tests to tsd (WIP) #4109 #4110
688
689# 0.21.12 - 02 November, 2020
690
691### Typings:
692
693- Reintroduce support for globally defining table/record mapping #4100
694- Add a few missing types for MSSQL Connection #4103
695- Make .ignore() and .merge() return QueryBuilder rather than QueryInterface #4102
696- Use tarn config TS types instead of generic-pool #4064
697
698# 0.21.11 - 01 November, 2020
699
700### Typings:
701
702- Revert support for globally defining table/record mapping #4099
703
704# 0.21.10 - 31 October, 2020
705
706### New features:
707
708- Upsert support (Postgres/MySQL/Sqlite) #3763
709
710### Bug fixes:
711
712- Switch to non-uuid knexQueryUids to avoid issues when mocking global date #4089
713
714### Typings:
715
716- Allow to globally define table/record mapping #4071
717
718# 0.21.9 - 27 October, 2020
719
720### New features:
721
722- add method clear(statement) to QueryBuilder #4051
723
724### Bug fixes:
725
726- CLI: fix help text being printed twice #4072
727- Oracle: columnInfo() no longer requires an Owner User #4053
728- Add missing "start" event propagation from transaction #4087
729
730# 0.21.8 - 27 October, 2020
731
732### Bug fixes:
733
734- MSSQL: Escape properly if literal '?' is needed #4053
735- Make toQuery behavior consistent with pre-0.21.7 (do not break on empty builder) #4083
736- Fix comment escaping for MySQL and PostgreSQL #4084
737
738# 0.21.7 - 25 October, 2020
739
740### New features:
741
742- CLI: Add migration stub for .cjs extension #4065
743
744### Bug fixes:
745
746- MSSQL: Add dynamic scaling for decimal values and prevents a UInt64 overflow #3910
747- MSSQL: Fix apostrophe escaping #4077
748- Ensure that semicolon is not appended to statements that already end with a semicolon #4052
749
750### Typings:
751
752- Add arguments to QueryCallback in Where #4034
753
754### Test / internal changes:
755
756- Replace lodash type-checks with native solutions #4056
757- Replace mkdirp with native recursive flag #4060
758- Replace inherits package with builtin utility #4059
759
760# 0.21.6 - 27 September, 2020
761
762### New features:
763
764- CLI: New config parameter / CLI flag to prefixing seed filename with timestamp #3873
765- CLI: throw an error when specific seed file cannot be found #4011
766- Warn if whereNot is used with 'in' or 'between' #4038
767
768### Bug fixes:
769
770- CLI: Fix double merging of config for migrator #4040
771
772### Typings:
773
774- Unify SeedsConfig and SeederConfig #4003
775- Allow string[] type for directory in SeedsConfig #4033
776
777# 0.21.5 - 17 August, 2020
778
779### New features:
780
781- CLI: Improve Esm interop #3985
782- CLI: Improve mjs module support #3980
783
784### Test / internal changes:
785
786- Bump version of dtslint #3984
787- Test/document esm interop mixed formats (knexfile/migrations/seeds) #3986
788
789# 0.21.4 - 10 August, 2020
790
791### New features:
792
793- CLI: Add new option for seed: recursive #3974
794
795### Bug fixes:
796
797- CLI: Do not load seeds from subfolders recursively by default #3974
798
799# 0.21.3 - 08 August, 2020
800
801### New features:
802
803- CLI: Support multiple directories for seeds #3967
804
805### Bug fixes:
806
807- Ensure DB stream is destroyed when the PassThrough is destroyed #2324
808- Support postProcessResponse for streams #3931
809- Fix ESM module interop for calling module/package of type 'module' #3938
810- CLI: Fix migration source name in rollback all #3956
811- Fix getMergedConfig calls to include client logger #3920
812- Escape single quoted values passed to defaultTo function #3899
813
814### Typings:
815
816- Add .timeout(ms) to .raw()'s typescript typings #3885
817- Add typing for double table column builder #3950
818- Add a phantom tag to Ref type to mark received type parameters as used #3934
819- Add `null` as valid binding type #3946
820
821### Test / internal changes:
822
823- Change query lab link to https #3933
824
825# 0.21.2 - 10 July, 2020
826
827### New features:
828
829- Warn user if custom migration source is being reset #3839
830- Prefer `void` as return type on migration generator ts stub #3865
831- MSSQL: Added the removal of a columns default constraint, before dropping the column #3855
832
833### Typings:
834
835- Fix definition for raw querybuilders #3846
836
837### Test / internal changes:
838
839- Refactor migration logic to use async/await #3838
840
841# 0.21.1 - 28 April, 2020
842
843### New features:
844
845- CLI: Add migrate:unlock command, truncate on forceFreeMigrationsLock #3822
846- CLI: Add support for cjs files by default #3829
847
848### Bug fixes:
849
850- CLI: Fix inference of seed/migration extension from knexfile extension #3814
851- rewrite delay to not node-only version. Fixes compatibility with browsers #3820
852
853### Test / internal changes:
854
855- Update dependencies. Explicitly support Node.js 14 #3825 #3830
856
857# 0.21.0 - 18 April, 2020
858
859### Improvements
860
861- Reduce size of lodash in bundle #3804
862
863### Breaking changes
864
865- Dropped support for Node 8
866- 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).`
867
868### Test / internal changes:
869
870- Updated Tarn.js to a version 3.0.0
871- Updated mkdirp to a version 1.0.4
872- Updated examples to use ES2015 style #3810
873
874# 0.20.15 - 16 April, 2020
875
876### Bug fixes:
877
878- Support for `.finally(..)` on knex's Promise-alikes #3800
879
880### Typings:
881
882- Add types for `.distinctOn` #3784
883
884# 0.20.14 - 13 April, 2020
885
886### New features:
887
888- CLI: adds support for asynchronous knexfile loading #3748
889- Add clearGroup method #3771
890
891### Typings:
892
893- Support Raw types for insert, where, update #3730
894- Add typings for MigrationSource #3756
895- Update signature of orderBy to support QueryBuilder inside array #3757
896- Add toSQL and toString to SchemaBuilder #3758
897- `interface Knex` and `function Knex` should have the same types #3787
898- Fix minor issues around typings #3765
899
900### Test / internal changes:
901
902- Minor test internal enhancements #3747
903- Minor improvements on the usage of fs utilities #3749
904- Split tests in groups #3785
905
906# 0.20.13 - 23 March, 2020
907
908### Bug fixes:
909
910- Correctly handle dateToString escaping without timezone passed #3742
911- Make protocol length check more defensive #3744
912
913### Typings:
914
915- Make the ChainableInterface conform to Promise<T> #3724
916
917# 0.20.12 - 19 March, 2020
918
919### Bug fixes:
920
921- Added missing call to \_reject in Transactor#transaction #3706
922- Fix method binding on knex proxy #3717
923- Oracle: Transaction_OracleDB can use config.connection #3731
924
925### Typings:
926
927- Fix incorrect type signature of Having #3719
928
929### Test / internal changes:
930
931- Cleanup/remove transaction stalling #3716
932- Rewrote Transaction#acquireConnection() methods to use async #3707
933
934# 0.20.11 - 26 February, 2020
935
936### Breaking changes:
937
938- 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.
939
940### New features:
941
942- Oracle: Add OracleDB handling for buffer type in fetchAsString #3685
943
944### Bug fixes:
945
946- Fix race condition in non-container transactions #3671
947
948### Typings:
949
950- Mark knex arguments of composite/collection types to be readonly #3680
951
952### Test / internal changes:
953
954- Remove dependency on Bluebird methods from sources #3683
955- Cleanup and extract Transaction Workflow logic #3674
956
957# 0.20.10 - 13 February, 2020
958
959### Bug fixes:
960
961- Oracle: commit was a no-op causing race conditions #3668
962- CLI: Knex calls process.chdir() before opening Knexfile #3661
963- Fixed unresolved promise in cancelQuery() #3666
964
965### Typings:
966
967- `fn.now` takes optionally a precision argument. #3662
968- PG: Include SSL in connection definition #3659
969
970### Test / internal changes:
971
972- replace Bluebird.timeout #3634
973
974# 0.20.9 - 08 February, 2020
975
976### Bug fixes:
977
978- CLI: Improve Support for Liftoff's Preloaders - this should fix some cases like using TS for your migrations #3613
979
980### Typings:
981
982- MSSQL: Add `enableArithAbort` to `MsSqlConnectionConfig`
983
984### Test / internal changes:
985
986- Refactor more tests to use cli-testlab #3640
987- Update QueryCompiler implementation to use classes #3647
988
989# 0.20.8 - 14 January, 2020
990
991### New features:
992
993- CLI: Support ES6 modules via flag --esm #3616
994
995### Bug fixes:
996
997- CLI: Print help only when there are no arguments #3617
998
999### Typings:
1000
1001- Fix incorrect type of QueryBuilder.first('\*') result #3621
1002
1003# 0.20.7 - 07 January, 2020
1004
1005### New features:
1006
1007- Throw better error when trying to modify schema while using unsupported dialect #3609
1008
1009### Bug fixes:
1010
1011- Oracle: dispose connection on connection error #3611
1012- Oracle: fix not releasing connection from pool on disconnect #3605
1013- CLI: prevent warning with root command #3604
1014
1015### Typings:
1016
1017- Add create/drop schema methods to SchemaBuilder #3579
1018
1019# 0.20.6 - 29 December, 2019
1020
1021### Bug fixes:
1022
1023- Enforce Unix (lf) line terminators #3598
1024
1025# 0.20.5 - 29 December, 2019
1026
1027### New features:
1028
1029- Return more information about empty updates #3597
1030
1031### Bug fixes:
1032
1033- Fix colors in debug logs #3592
1034
1035### Test / internal changes:
1036
1037- Use more efficient algorithm for generating internal ids #3595 #3596
1038- Use Buffer.alloc() instead of deprecated constructor #3574
1039
1040# 0.20.4 - 08 December, 2019
1041
1042### Bug fixes:
1043
1044- Fix debug logger messing up queries with % #3566
1045- Make logger methods mutually consistent #3567
1046
1047### Typings:
1048
1049- Add missing methods to client type #3565
1050- Fix queryContext function defintion #3562
1051- Fix QueryBuilder.extend this type #3526 #3528
1052
1053### Test / internal changes:
1054
1055- Remove bluebird.using #3552
1056
1057# 0.20.3 - 27 November, 2019
1058
1059### New features:
1060
1061- MSSQL, MySQL: Add connection string qs to connection params #3547
1062
1063### Bug fixes:
1064
1065- Oracle: Fix issue retrieving BLOB from database #3545
1066- PostgreSQL: Timeout for postgresql use cancel instead of terminate #3518
1067- Make sure CLI works for namespaced knex packages #2539
1068
1069### Typings:
1070
1071- Lift up dialect specific methods in the CreateTableBuilder #3532
1072- Add client property to QueryBuilder type #3541
1073- Support 'only' option #3551
1074
1075# 0.20.2 - 14 November, 2019
1076
1077### New features:
1078
1079- Add support for distinct on for postgres #3513
1080
1081### Bug fixes:
1082
1083- Make sqlite3 hasColumn case insensitive #3435
1084
1085### Typings:
1086
1087- Fix PoolConfig typing #3505
1088- Expand SeedsConfig types #3531
1089- Make the default type parameters of QueryBuilder less strict #3520
1090- Fix regression in older version of node when Promise#finally was not available #3507
1091
1092# 0.20.1 - 29 October, 2019
1093
1094### New features:
1095
1096- Declare drivers as optional peerDependencies #3081
1097- Dynamic connection configuration resolution #3497
1098
1099### Bug fixes:
1100
1101- Wrap subQuery with parenthesis when it appears as table name #3496
1102- Fix Oracle error codes #3498
1103
1104### Typings:
1105
1106- Add interface for PG Connection object #3372
1107- Gracefully handle global promise pollution #3502
1108
1109# 0.20.0 - 25 October, 2019
1110
1111### New features:
1112
1113- orderBy accepts QueryBuilder #3491
1114- Add validation in `.offset()` #2908
1115- disable_migrations_list_validation feature #3448
1116
1117### Bug fixes:
1118
1119- Fix oracledb driver v4 support #3480
1120- Fix some issues around seed and migration generation #3479
1121- Fix bugs in replacement logic used when dropping columns in SQLite #3476
1122
1123### Typings:
1124
1125- Add types to the Migrator interface #3459
1126- Fix typings of index and dropIndex TableBuilder methods #3486
1127- Fixes types for Seeder#run #3438
1128
1129### Test / internal changes:
1130
1131- Execute CI on Node.js 13
1132- Bluebird: remove usage of `return`, `reflect`, `fromCallback` methods #3483
1133- Bluebird: remove Bluebird.bind #3477
1134- Bluebird: use util.promisify instead of Bluebird.promisify #3470
1135- Bluebird: remove Bluebird.each #3471
1136- Bluebird: remove Bluebird.map and Bluebird.mapSeries #3474
1137- Bluebird: replace Bluebird.map with Promise.all #3469
1138- Update badges #3482
1139
1140# 0.19.5 - 06 October, 2019
1141
1142### New features:
1143
1144- CLI: Migrations up/down commands - filename parameter #3416
1145- Oracle: Support stored procedures #3449
1146
1147### Bug fixes:
1148
1149- MSSQL: Escape column ids correctly in all cases (reported by Snyk Security Research Team) #3382
1150- SQLite: Fix handling of multiline SQL in SQLite3 schema #3411
1151- Fix concurrent child transactions failing #2213 #3440
1152
1153### Typings:
1154
1155- Add missing Migrator.list typing #3460
1156- Fix Typescript type inference for to better support wildcard (\*) calls #3444
1157- Make options argument optional in timeout #3442
1158
1159### Test / internal changes:
1160
1161- Enable linting in CI #3450
1162
1163# 0.19.4 - 09 September, 2019
1164
1165### New features:
1166
1167- Add undefined columns to undefined binding(s) error #3425
1168
1169### Typings:
1170
1171- Add `specific` to SeederConfig type #3429
1172- Fix some issues with QueryBuilder types #3427
1173
1174# 0.19.3 - 25 August, 2019
1175
1176### Bug fixes:
1177
1178- Fix migrations for native enums to use table schema #3307
1179
1180### New features:
1181
1182- Add ability to manually define schema for native enums #3307
1183- Add SSL/TLS support for Postgres connection string #3410
1184- CLI: new command that lists all migrations with status #3390
1185
1186### Typings:
1187
1188- Include schemaName in EnumOptions #3415
1189- Allow `ColumnBuilder.defaultTo()` to be `null` #3407
1190
1191### Changes:
1192
1193- migrate: Refactor \_lockMigrations to avoid forUpdate - makes migrations compatible with CockroachDB #3395
1194
1195# 0.19.2 - 17 August, 2019
1196
1197### Changes:
1198
1199- Make transaction rejection consistent across dialects #3399
1200- More consistent handling of nested transactions #3393
1201
1202### New features:
1203
1204- Fallback to JSON when using JSONB in MySQL #3394
1205
1206# 0.19.1 - 23 July, 2019
1207
1208### New features:
1209
1210- Allow to extend knex query builder #3334
1211- Add .isCompleted() to transaction #3368
1212- Minor enhancements around aliasing of aggregates #3354
1213
1214### Typings:
1215
1216- Update configuration typings to allow for oracle db connectionstring #3361
1217- Update Knex.raw type to be any by default because the actual type is dialect specific #3349
1218
1219# 0.19.0 - 11 July, 2019
1220
1221### Changes:
1222
1223- 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
1224- Pooling: Passing unsupported pooling configuration options now throws an error
1225- Pooling: `beforeDestroy` configuration option was removed
1226
1227# 0.18.4 - 10 July, 2019
1228
1229### New features:
1230
1231- Seeds: Option to run specific seed file #3335
1232- Implement "skipLocked()" and "noWait()" #2961
1233
1234### Bug fixes:
1235
1236- CLI: Respect the knexfile stub option while generating a migration #3337
1237- Fix mssql import not being ignored, breaking webpack builds #3336
1238
1239# 0.18.3 - 04 July, 2019
1240
1241### New features:
1242
1243- CLI: add --stub option to migration:make #3316
1244
1245### Bug fixes:
1246
1247- Fix return duplicate transaction promise for standalone transactions #3328
1248
1249# 0.18.2 - 03 July, 2019
1250
1251### Bug fixes:
1252
1253- Fix remove duplicate transaction rejection #3324
1254- Fix issues around specifying default values for columns #3318
1255- CLI: Fix empty --version output #3312
1256
1257# 0.18.1 - 30 June, 2019
1258
1259### Bug fixes:
1260
1261- Do not reject duplicate promise on transaction rollback #3319
1262
1263# 0.18.0 - 26 June, 2019
1264
1265### Bug fixes:
1266
1267- 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
1268
1269### New features:
1270
1271- Added `doNotRejectOnRollback` options for starting transactions, to prevent rejecting promises on rollback for callback-style transactions.
1272- Use extension from knexfile for generating migrations unless overriden #3282
1273- Use migrations.extension from config when generating migration #3242
1274- Expose executionPromise for transactors #3297
1275
1276### Bug fixes:
1277
1278- Oracle: Updated handling of connection errors for disposal #2608
1279- Fix extension resolution from env configs #3294
1280
1281### Test / internal changes:
1282
1283- Drop support for Node.js 6 #3227
1284- Remove Babel #3227
1285- Remove Bluebird #3290 #3287 #3285 #3267 #3266 #3263
1286- Fix comments that were modified by find & replace #3308
1287
1288### Typings:
1289
1290- Add workarounds for degraded inference when strictNullChecks is set to false #3275
1291- Add stub type definition for Migrator config #3279
1292- Add stub to seeds type #3296
1293- Fix MSSQL config typings #3269
1294- Add pgsql specific table builder method typings #3146
1295
1296# 0.17.5 - 8 June, 2019
1297
1298### Typings:
1299
1300- Include result.d.ts in published package #3271
1301
1302# 0.17.4 - 8 June, 2019
1303
1304### Typings:
1305
1306- Fix some cases of left-to-right inference causing type mismatch #3265
1307- Improve count typings #3249
1308
1309### Bug fixes:
1310
1311- Fix error message bubbling up on seed error #3248
1312
1313# 0.17.3 - 2 June, 2019
1314
1315### Typings:
1316
1317- Improve typings for aggregations #3245
1318- Add decimalNumbers to MySqlConnectionConfig interface #3244
1319
1320# 0.17.2 - 1 June, 2019
1321
1322### Typings
1323
1324- Improve count typings #3239
1325
1326### Bug fixes:
1327
1328- "colorette" dependency breaks browserify builds #3238
1329
1330# 0.17.1 - 31 May, 2019
1331
1332### New features:
1333
1334- Add migrate:down functionality #3228
1335
1336### Typings:
1337
1338- Update type of aggregation results to not be arrays when first has been invoked before #3237
1339- Include undefined in type of single row results #3231
1340- Fix incorrect type definitions for single row queries #3230
1341
1342# 0.17.0 - 28 May, 2019
1343
1344### New features:
1345
1346- Add support for returning started transaction without immediately executing it #3099
1347- Add support for passing transaction around with only starting it when needed #3099
1348- Add clearHaving function #3141
1349- Add --all flag for rollback in CLI #3187
1350- Add error detail log to knex CLI #3149
1351- Support multi-column whereIn in sqlite through values clause #3220
1352- Allow users to specify the migrations "tableName" parameter via the CLI #3214
1353- Unify object options handling for datetime/timestamp across dialects #3181
1354- Add "up" command for migrations #3205
1355
1356### Typings:
1357
1358- Add default values for generic types (fixes backwards compatibility broken by 0.16.6) #3189
1359- Make function types generic in type definitions #3168
1360- Add missing types to MigratorConfig #3174
1361- Add types for havingBetween, orHavingBetween, havingNotBetween and orHavingNotBetween #3144
1362- Update Knex.Config types to include log #3221
1363- Fix some more cases of missing typings #3223
1364- Support type safe refs #3215
1365- Expose some utility types #3211
1366- Fix issues with typings of joins and some conflicts with Bluebird typings #3209
1367
1368### Bug fixes:
1369
1370- Fix order of migration rollback #3172
1371
1372### Test / internal changes:
1373
1374- Execute CI tests on Node.js 12 #3171
1375- Docker-based test dbs #3157
1376- Use cli-testlab for testing CLI #3191
1377
1378# 0.16.5 - 11 Apr, 2019
1379
1380- Bundle polyfills with knex for 0.16.x line again #3139
1381
1382# 0.16.4 - 11 Apr, 2019
1383
1384### New features:
1385
1386- Boolean param for rollback() to rollback all migrations #2968
1387- seed:run print the file name of the failing seed #2972 #2973
1388- verbose option to CLI commands #2887
1389- add intersect() #3023
1390- Improved format for TS stubs #3080
1391- MySQL: Support nullable timestamps #3100
1392- MySQL: Warn `.returning()` does not have any effect #3039
1393
1394### Bug fixes:
1395
1396- Respect "loadExtensions" configuration #2969
1397- Fix event listener duplication when using Migrator #2982
1398- Fix fs-migrations breaking docs #3022
1399- Fix sqlite3 drop/renameColumn() breaks with postProcessResponse #3040
1400- Fix transaction support for migrations #3084
1401- Fix queryContext not being passed to raw queries #3111
1402- Typings: Allow to pass query builders, identifiers and raw in various places as parameters #2960
1403- Typings: toNative() definition #2996
1404- Typings: asCallback() definition #2963
1405- Typings: queryContext() type definition Knex.Raw #3002
1406- Typings: Add "constraintName" arg to primary() definition #3006
1407- Typings: Add missing schemaName in MigratorConfig #3016
1408- Typings: Add missing supported parameter types and toSQL method #2960
1409- Typings: Update enum arguments to reflect latest signature #3043
1410- Typings: Add size parameter to integer method #3074
1411- Typings: Add 'string' as accepted Knex constructor type definition #3105
1412- Typings: Add boolean as a column name in join #3121
1413- Typings: Add missing clearOrder & clearCounters types #3109
1414- Dependencies: Fix security warning #3082
1415- Do not use unsupported column width/length arguments on data types int and tinyint in MSSQL #2738
1416
1417### Changes:
1418
1419- Make unionAll()'s call signature match union() #3055
1420
1421### Test / internal changes:
1422
1423- Swap chalk→colorette / minimist→getopts #2718
1424- Always use well documented pg client query() config argument #3004
1425- Do not bundle polyfills with knex #3024
1426
1427# 0.16.3 - 19 Dec, 2018
1428
1429### Bug fixes:
1430
1431- @babel/polyfill loaded multiple times #2955
1432- Resolve migrations and seeds relatively to knexfile directory when specified (the way it used to be before 0.16.1) #2952
1433
1434# 0.16.2 - 10 Dec, 2018
1435
1436### Bug fixes:
1437
1438- Add TypeScript types to the "files" entry so they are properly included in the release #2943
1439
1440# 0.16.1 - 28 Nov, 2018
1441
1442### Breaking Changes:
1443
1444- Use datetime2 for MSSQL datetime + timestamp types. This change is incompatible with MSSQL older than 2008 #2757
1445- Knex.VERSION() method was removed, run "require('knex/package').version" instead #2776
1446- Knex transpilation now targets Node.js 6, meaning it will no longer run on older Node.js versions #2813
1447- Add json type support for SQLite 3.9+ (tested to work with Node package 'sqlite3' 4.0.2+) #2814
1448
1449### New features:
1450
1451- Support passing explicit connection to query builder (#2817)
1452- Introduced abstraction for getting migrations to make migration bundling easier #2775
1453- Allow timestamp with timezone on mssql databases #2724
1454- Allow specifying multiple migration directories #2735
1455- Allow cloning query builder with .userParams({}) assigned to it #2802
1456- Allow chaining of increment, decrement, and update #2740
1457- Allow table names with `forUpdate`/`forShare` #2834
1458- Added `whereColumn` and the associated `not` / `and` / `or` methods for using columns on the right side of a where clause #2837
1459- Added `whereRecursive` method to make self-referential CTEs possible #2889
1460- Added support for named unique, primary and foreign keys to SQLite3 #2840
1461- Added support for generating new migration and seed files without knexfile #2884 #2905 #2935
1462- Added support for multiple columns in `.orderBy()` #2881
1463- Added option of `existingType` to `.enum()` method to support repeated use of enums #2719
1464- Added option to pass `indexType` for MySQL dialect #2890
1465- Added `onVal` and the associated `not` / `and` / `or` methods for using values in `on` clauses within joins #2746
1466- Kill queries after timeout for PostgreSQL #2636
1467- Manage TypeScript types internally #2845
1468- Support 5.0.0+ versions of mssql driver #2861
1469- Typescript migration stub #2816
1470- Options object for passing timestamp parameters + regression tests #2919
1471
1472### Bug fixes:
1473
1474- Implement fail-fast logic for dialect resolution #2776
1475- Fixed identifier wrapping for `using()`. Use columnize instead of wrap in using() #2713
1476- Fix issues with warnPromise when migration does not return a promise #2730
1477- Compile with before update so that bindings are put in correct order #2733
1478- Fix join using builder withSchema #2744
1479- Throw instead of process.exit when client module missing #2843
1480- Display correct filename of a migration that failed #2910
1481- Fixed support of knexSnakeCaseWrappers in migrations #2914
1482- SQlite3 renameColunm quote fix #2833
1483- Adjust typing for forUpdate()/forShare() variant with table names #2858
1484- Fix execution of Oracle tests on Node 11 #2920
1485- Fix failures in oracle test bench and added it back to mandatory CI tests #2924
1486- Knex client knexfile resolution fix #2923
1487- Add queryContext to type declarations #2931
1488
1489### Test / internal changes:
1490
1491- Add tests for multiple union arguments with callbacks and builders #2749
1492- Update dependencies #2772 #2810 #2842 #2848 #2893 #2904
1493- Separate migration generator #2786
1494- Do not postprocess internal queries in Migrator #2914 #2934
1495- Use Babel 7 #2813
1496- Introduce LGTM.com badge #2755
1497- Cleanup based on analysis by https://lgtm.com #2870
1498- Add test for retrieving null dates #2865
1499- Add link to wiki #2866
1500- Add tests for specifying explicit pg version #2895
1501- Execute tests on Node.js 11 #2873
1502- Version upgrade guide #2894
1503
1504# 0.16.0 - 27 Nov, 2018
1505
1506### Changes:
1507
1508- THIS RELEASE WAS UNPUBLISHED FROM NPM BECAUSE IT HAD BROKEN MIGRATIONS USING `postprocessResponse` FEATURE (#2644)
1509
1510# 0.15.2 - 19 Jul, 2018
1511
1512### Changes:
1513
1514- 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)
1515
1516# 0.15.1 - 12 Jul, 2018
1517
1518### Bug fixes:
1519
1520- Fix warning erroneously displayed for mysql #2705
1521
1522# 0.15.0 - 1 Jul, 2018
1523
1524### Breaking Changes:
1525
1526- Stop executing tests on Node 4 and 5. #2451 (not supported anymore)
1527- `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
1528- Removed WebSQL dialect #2461
1529- Drop mariadb support #2681
1530- 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.
1531- Ensure knex.destroy() returns a bluebird promise #2589
1532- Increment floats #2614
1533- 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
1534- Drop support for strong-oracle #2487
1535- Timeout errors doesn't silently ignore the passed errors anymore #2626
1536- Removed WebSQL dialect #2647
1537- 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.
1538
1539### Bug fixes:
1540
1541- Fixes onIn with empty values array #2513
1542- fix wrapIdentifier not being called in postgres alter column #2612
1543- fixes wrapIdentifier to work with postgres `returning` statement 2630 #2642
1544- Fix mssql driver crashing in certain cases when conneciton is closed unexpectedly #2637
1545- Removed semicolon from rollback stmt for oracle #2564
1546- Make the stream catch errors in the query #2638
1547
1548### New Features:
1549
1550- Create timestamp columns with microsecond precision on MySQL 5.6 and newer #2542
1551- Allow storing stacktrace, where builder is initialized to be able trace back where certain query was created #2500 #2505
1552- Added 'ref' function #2509, no need for knex.raw('??', ['id']) anymore, one can do knex.ref('id')
1553- Support postgresql connection uri protocol #2609
1554- Add support for native enums on Postgres #2632
1555- Allow overwriting log functions #2625
1556
1557### Test / internal changes:
1558
1559- chore: cache node_modules #2595
1560- Remove babel-plugin-lodash #2634
1561- Remove readable-stream and safe-buffer #2640
1562- chore: add Node.js 10 #2594
1563- add homepage field to package.json #2650
1564
1565# 0.14.6 - 12 Apr, 2018
1566
1567### Bug fixes:
1568
1569- Restored functionality of query event #2566 (#2549)
1570
1571# 0.14.5 - 8 Apr, 2018
1572
1573### Bug fixes:
1574
1575- Fix wrapping returning column on oracledb #2554
1576
1577### New Features:
1578
1579- Support passing DB schema name for migrations #2499 #2559
1580- add clearOrder method #2360 #2553
1581- Added knexTxId to query events and debug calls #2476
1582- Support multi-column `whereIn` with query #1390
1583- Added error if chaining update/insert/etc with first() #2506
1584- Checks for an empty, undefined or null object on transacting #2494
1585- countDistinct with multiple columns #2449
1586
1587### Test / internal changes:
1588
1589- Added npm run test:oracledb command that runs oracledb tests in docker #2491
1590- Runnin mssql tests in docker #2496
1591- Update dependencies #2561
1592
1593# 0.14.4 - 19 Feb, 2018
1594
1595### Bug fixes:
1596
1597- containsUndefined only validate plain objects. Fixes #1898 (#2468)
1598- Add warning when using .returning() in sqlite3. Fixes #1660 (#2471)
1599- Throw an error if .update() results in an empty sql (#2472)
1600- Removed unnecessary createTableIfNotExist and replaced with createTable (#2473)
1601
1602### New Features:
1603
1604- Allow calling lock procedures (such as forUpdate) outside of transaction. Fixes #2403. (#2475)
1605- Added test and documentation for Event 'start' (#2488)
1606
1607### Test / internal changes:
1608
1609- Added stress test, which uses TCP proxy to simulate flaky connection #2460
1610- Removed old docker tests, new stress test setup (#2474)
1611- Removed unused property \_\_cid on the base client (#2481)
1612- Changed rm to rimraf in 'npm run dev' (#2483)
1613- Changed babel preset and use latest node as target when running dev (#2484)
1614
1615# 0.14.3 - 8 Feb, 2018
1616
1617### Bug fixes:
1618
1619- Use tarn as pool instead of generic-pool which has been given various problems #2450
1620- Fixed mysql issue where add columns failed if using both after and collate #2432
1621- CLI sets exit-code 1 if the command supplied was not parseable #2358
1622- Set toNative() to be not enumerable #2388
1623- Use wrapIdentifier in columnInfo. fixes #2402 #2405
1624- Fixed a bug when using .returning (OUTPUT) in an update query with joins in MSSQL #2399
1625- Better error message when running migrations fail before even starting run migrations #2373
1626- Read oracle's UV_THREADPOOL_SIZE env variable correctly #2372
1627- Added decimal variable precision / scale support #2353
1628
1629### New Features:
1630
1631- Added queryContext to schema and query builders #2314
1632- Added redshift dialect #2233
1633- Added warning when one uses .createTableIfNotExist and deprecated it from docs #2458
1634
1635### Test / internal changes:
1636
1637- Update dependencies and fix ESLint warnings accordingly #2433
1638- Disable oracledb tests from non LTS nodes #2407
1639- Update dependencies #2422
1640
1641# 0.14.2 - 24 Nov, 2017
1642
1643### Bug fixes:
1644
1645- Fix sqlite3 truncate method to work again #2348
1646
1647# 0.14.1 - 19 Nov, 2017
1648
1649### Bug fixes:
1650
1651- Fix support for multiple schema names in in postgres `searchPath` #2340
1652- Fix create new connection to pass errors to query instead of retry loop #2336
1653- Fix recognition of connections closed by server #2341
1654
1655# 0.14.0 - 6 Nov, 2017
1656
1657### Breaking Changes:
1658
1659- Remove sorting of statements from update queries #2171
1660- Updated allowed operator list with some missing operators and make all to lower case #2239
1661- Use node-mssql 4.0.0 #2029
1662- Support for enum columns to SQlite3 dialect #2055
1663- Better identifier quoting in Sqlite3 #2087
1664- Migration Errors - Display filename of of failed migration #2272
1665
1666### Other Features:
1667
1668- Post processing hook for query result #2261
1669- Build native SQL where binding parameters are dialect specific #2237
1670- Configuration option to allow override identifier wrapping #2217
1671- Implemented select syntax: select({ alias: 'column' }) #2227
1672- Allows to filter seeds and migrations by extensions #2168
1673- Reconnecting after database server disconnect/reconnect + tests #2017
1674- Removed filering from allowed configuration settings of mysql2 #2040
1675- Allow raw expressions in query builder aggregate methods #2257
1676- Throw error on non-string table comment #2126
1677- Support for mysql stream query options #2301
1678
1679### Bug fixes:
1680
1681- Allow update queries and passing query builder to with statements #2298
1682- Fix escape table name in SQLite columnInfo call #2281
1683- Preventing containsUndefined from going to recursion loop #1711
1684- Fix error caused by call to knex.migrate.currentVersion #2123
1685- Upgraded generic-pool to 3.1.7 (did resolve some memory issues) #2208
1686- Allow using NOT ILIKE operator #2195
1687- Fix postgres searchPath to be case-sensitive #2172
1688- Fix drop of multiple columns in sqlite3 #2107
1689- Fix adding multiple columns in Oracle #2115
1690- Use selected schema when dropping indices in Postgres. #2105
1691- Fix hasTable for MySQL to not do partial matches #2097
1692- Fix setting autoTransaction in batchInsert #2113
1693- Fix connection error propagation when streaming #2199
1694- Fix comments not being applied to increments columns #2243
1695- Fix mssql wrong binding order of queries that combine a limit with select raw or update #2066
1696- Fixed mysql alter table attributes order #2062
1697
1698### Test / internal changes:
1699
1700- Update each out-of-date dependency according to david-dm.org #2297
1701- Update v8flags to version 3.0.0 #2288
1702- Update interpret version #2283
1703- Fix debug output typo #2187
1704- Docker CI tests #2164
1705- Unit test for right/rightOuterJoin combination #2117
1706- Unit test for fullOuterJoin #2118
1707- Unit tests for table comment #2098
1708- Test referencing non-existent column with sqlite3 #2104
1709- Unit test for renaming column in postgresql #2099
1710- Unit test for cross-join #2102
1711- Fix incorrect parameter name #2068
1712
1713# 0.13.0 - 29 Apr, 2017
1714
1715### Breaking Changes:
1716
1717- Multiple concurrent migration runners blocks instead of throwing error when possible #1962
1718- Fixed transaction promise mutation issue #1991
1719
1720### Other Changes:
1721
1722- Allow passing version of connected db in configuration file #1993
1723- Bugfixes on batchInsert and transactions for mysql/maria #1992
1724- Add fetchAsString optional parameter to oracledb dialect #1998
1725- fix: escapeObject parameter order for Postgres dialect. #2003
1726
1727# 0.12.9 - 23 Mar, 2017
1728
1729- Fixed unhandled exception in batchInsert when the rows to be inserted resulted in duplicate key violation #1880
1730
1731# 0.12.8 - 15 Mar, 2017
1732
1733- Added clearSelect and clearWhere to query builder #1912
1734- Properly close Postgres query streams on error #1935
1735- Transactions should never reject with undefined #1970
1736- Clear acquireConnectionTimeout if an error occurs when acquiring a connection #1973
1737
1738# 0.12.7 - 17 Feb, 2017
1739
1740### Accidental Breaking Change:
1741
1742- Ensure that 'client' is provided in knex config object #1822
1743
1744### Other Changes:
1745
1746- Support custom foreign key names #1311, #1726
1747- Fixed named bindings to work with queries containing `:`-chars #1890
1748- Exposed more promise functions #1896
1749- Pass rollback errors to transaction promise in mssql #1885
1750- ONLY keyword support for PostgreSQL (for table inheritance) #1874
1751- Fixed Mssql update with join syntax #1777
1752- Replace migrations and seed for react-native packager #1813
1753- Support knexfile, migration and seeds in TypeScript #1769
1754- Fix float to integer conversion of decimal fields in MSSQL #1781
1755- External authentication capability when using oracledb driver #1716
1756- Fixed MSSQL incorect query build when locks are used #1707
1757- Allow to use `first` method as aliased select #1784
1758- Alter column for nullability, type and default value #46, #1759
1759- Add more having* methods / join clause on* methods #1674
1760- Compatibility fixes and cleanups #1788, #1792, #1794, #1814, #1857, #1649
1761
1762# 0.12.6 - 19 Oct, 2016
1763
1764- Address warnings mentioned in #1388 (#1740)
1765- Remove postinstall script (#1746)
1766
1767# 0.12.5 - 12 Oct, 2016
1768
1769- Fix broken 0.12.4 build (removed from npm)
1770- Fix #1733, #920, incorrect postgres array bindings
1771
1772# 0.12.3 - 9 Oct, 2016
1773
1774- Fix #1703, #1694 - connections should be returned to pool if acquireConnectionTimeout is triggered
1775- Fix #1710 regression in postgres array escaping
1776
1777# 0.12.2 - 27 Sep, 2016
1778
1779- Restore pool min: 1 for sqlite3, #1701
1780- Fix for connection error after it's closed / released, #1691
1781- Fix oracle prefetchRowCount setting, #1675
1782
1783# 0.12.1 - 16 Sep, 2016
1784
1785- Fix MSSQL sql execution error, #1669
1786- Added DEBUG=knex:bindings for debugging query bindings, #1557
1787
1788# 0.12.0 - 13 Sep, 2016
1789
1790- Remove build / built files, #1616
1791- Upgrade to Babel 6, #1617
1792- Reference Bluebird module directly, remove deprecated .exec method, #1618
1793- Remove documentation files from main repo
1794- Fix broken behavior on WebSQL build, #1638
1795- Oracle id sequence now handles manual inserts, #906
1796- Cleanup PG escaping, fix #1602, #1548
1797- Added [`with`](#Builder-with) to builder for [common table expressions](https://www.postgresql.org/docs/9.4/static/queries-with.html), #1599
1798- Fix #1619, pluck with explicit column names
1799- Switching back to [generic-pool](https://github.com/coopernurse/node-pool) for pooling resource management
1800- Removed index.html, please direct all PR's for docs against the files in [knex/documentation](https://github.com/knex/documentation)
1801
1802# 0.11.10 - 9 Aug, 2016
1803
1804- Added CHANGELOG.md for a [new documentation](https://github.com/knex/documentation) builder coming soon, #1615
1805- Minor documentation tweaks
1806- PG: Fix Uint8Array being considered undefined, #1601
1807- MSSQL: Make columnInfo schema dynamic, #1585
1808
1809# 0.11.9 - 21 Jul, 2016
1810
1811- Reverted knex client breaking change (commit b74cd69e906), fixes #1587
1812
1813# 0.11.8 - 21 Jul, 2016
1814
1815- Oracledb dialect #990
1816- Documentation fix #1532
1817- Allow named bindings to be escaped. #1576
1818- Several bugs with MS SQL schema creation and installing from gihub fix #1577
1819- Fix incorrect escaping of backslashes in SqlString.escape #1545
1820
1821# 0.11.7 - 19 Jun, 2016
1822
1823- Add missing dependency. #1516
1824
1825# 0.11.6 - 18 Jun, 2016
1826
1827- Allow cancellation on timeout (MySQL) #1454
1828- Better bigint support. (MSSQL) #1445
1829- More consistent handling of `undefined` values in `QueryBuilder#where` and `Raw`. #1459
1830- Fix Webpack build. #1447
1831- Fix code that triggered Bluebird warnings. #1460, #1489
1832- Fix `ping` function. (Oracle) #1486
1833- Fix `columnInfo`. (MSSQL) #1464
1834- Fix `ColumnCompiler#binary`. (MSSQL) #1464
1835- Allow connection strings that do not contain a password. #1473
1836- Fix race condition in seed stubs. #1493
1837- Give each query a UUID. #1510
1838
1839# 0.11.5 - 26 May, 2016
1840
1841- Bugfix: Using `Raw` or `QueryBuilder` as a binding to `Raw` now works as intended
1842
1843# 0.11.4 - 22 May, 2016
1844
1845- Bugfix: Inconsistency of `.primary()` and `.dropPrimary()` between dialects #1430
1846- Feature: Allow using custom Client/Dialect (you can pass your own client in knex config) #1428
1847- Docs: Add documentation for .dropTimestamps #1432
1848- Bugfix: Fixed passing undefined fields for insert/update inside transaction #1423
1849- Feature: `batchInsert` with existing transaction #1354
1850- Build: eslint instead of jshint #1416
1851- Bugfix: Pooled connections not releasing #1382
1852- Bugfix: Support passing `knex.raw` to `.whereNot` #1402
1853- Docs: Fixed list of dialects which supports `.returning` #1398
1854- Bugfix: rename table does not fail anymore even with schema defined #1403
1855
1856# 0.11.3 - 14 May, 2016
1857
1858- Support nested joins. #1397
1859
1860# 0.11.2 - 14 May, 2016
1861
1862- Prevent crash on `knex seed:make`. #1389
1863- Improvements to `batchInsert`. #1391
1864- Improvements to inserting `DEFAULT` with `undefined` binding. #1396
1865- Correct generated code for adding/dropping multiple columns. (MSSQL) #1401
1866
1867# 0.11.1 - 6 May, 2016
1868
1869- Fix error in CLI command `migrate:make`. #1386
1870
1871# 0.11.0 - 5 May, 2016
1872
1873### Breaking Changes:
1874
1875- `QueryBuilder#orWhere` joins multiple arguments with `AND`. #1164
1876
1877### Other Changes:
1878
1879- Collate for columns. (MySQL) #1147
1880- Add `QueryBuilder#timeout`, `Raw#timeout`. #1201 #1260
1881- Exit with error code when appropriate. #1238
1882- MSSQL connection accepts `host` as an alias for `server` in accordance with other dialects. #1239
1883- Add `query-response` event. #1231
1884- Correct behaviour of sibling nested transactions. #1226
1885- Support `RETURNING` with `UPDATE`. (Oracle) #1253
1886- Throwing callbacks from transactions automatically rolls them back. #1257
1887- Fixes to named `Raw` bindings. #1251
1888- `timestamps` accepts an argument to set `NOT NULL` and default to current timestamp.
1889- Add `TableBuilder#inherits` for PostgreSQL. #601
1890- Wrap index names. #1289
1891- Restore coffeescript knexfiles and configurations. #1292
1892- Add `andWhereBetween` and `andWhereNotBetween` #1132
1893- Fix `valueForUndefined` failure. #1269
1894- `renameColumn` no longer drops default value or nullability. #1326
1895- Correct MySQL2 error handling. #1315
1896- Fix MSSQL `createTableIfNotExists`. #1362
1897- Fix MSSQL URL parsing. #1342
1898- Update Lodash to 4.6.0 #1242
1899- Update Bluebird to 3.3.4 #1279
1900
1901# 0.10.0 - 15 Feb, 2016
1902
1903### Breaking Changes:
1904
1905- `insert` and `update` now ignore `undefined` values. Back compatibility is provided through the option `useNullAsDefault`. #1174, #1043
1906
1907### Other Changes:
1908
1909- Add [`countDistinct`](#Builder-countDistinct), [`avgDistinct`](#Builder-avgDistinct) and [`sumDistinct`](#Builder-sumDistinct). #1046
1910- Add [`schema.jsonb`](#Schema-jsonb). Deprecated `schema.json(column, true)`. #991
1911- Support binding identifiers with `??`. #1103
1912- Restore `query` event when triggered by transactions. #855
1913- Correct question mark escaping in rendered queries. #519, #1058
1914- Add per-dialect escaping, allowing quotes to be escaped correctly. #886, #1095
1915- Add MSSQL support. #1090
1916- Add migration locking. #1094
1917- Allow column aliases to contain `.`. #1181
1918- Add `batchInsert`. #1182
1919- Support non-array arguments to [`knex.raw`](#Raw-Bindings).
1920- Global `query-error` event. #1163
1921- Add `batchInsert`. #1182
1922- Better support for Mysql2 dialect options. #980
1923- Support for `acquireConnectionTimeout` default 60 seconds preventing #1040 from happening. #1177
1924- Fixed constraint name escaping when dropping a constraint. #1177
1925- Show also `.raw` queries in debug output. #1169
1926- Support for `cli` to use basic configuration without specific environment set. #1101
1927
1928# 0.9.0 - Nov 2, 2015
1929
1930- Fix error when merging `knex.raw` instances without arguments. #853
1931- Fix error that caused the connection to time out while streaming. #849
1932- Correctly parse SSL query parameter for PostgreSQL. #852
1933- Pass `compress` option to MySQL2. #843
1934- Schema: Use `timestamp with timezone` by default for `time`, `datetime` and `timestamp` for Oracle. #876
1935- Add [`QueryBuilder#modify`](#Builder-modify) #881
1936- Add LiveScript and Early Gray support for seeds and migrations.
1937- Add [`QueryBuilder#withSchema`](#Builder-withSchema) #518
1938- Allow escaping of `?` in `knex.raw` queries. #946
1939- Allow `0` in join clause. #953
1940- Add migration config to allow disabling/enabling transactions per migration. #834
1941
1942# 0.8.6 - May 20, 2015
1943
1944- Fix for several transaction / migration issues, #832, #833, #834, #835
1945
1946# 0.8.5 - May 14, 2015
1947
1948- Pool should be initialized if no pool options are specified
1949
1950# 0.8.4 - May 13, 2015
1951
1952- Pool should not be initialized if {max: 0} is sent in config options
1953
1954# 0.8.3 - May 2, 2015
1955
1956- Alias postgresql -> postgres in connection config options
1957
1958# 0.8.2 - May 1, 2015
1959
1960- Fix regression in using query string in connection config
1961
1962# 0.8.1 - May 1, 2015
1963
1964- Warn rather than error when implicit commits wipe out savepoints in mysql / mariadb, #805.
1965- Fix for incorrect seed config reference, #804
1966
1967# 0.8.0 - Apr 30, 2015
1968
1969### New Features:
1970
1971- Fixes several major outstanding bugs with the connection pool, switching to [Pool2](https://github.com/myndzi/pool2) in place of generic-pool-redux
1972- strong-oracle module support
1973- Nested transactions automatically become savepoints, with `commit` & `rollback` releasing or rolling back the current savepoint.
1974- Database seed file support, #391
1975- Improved support for sub-raw queries within raw statements
1976- Migrations are now wrapped in transactions where possible
1977- Subqueries supported in insert statements, #627
1978- Support for nested having, #572
1979- Support object syntax for joins, similar to "where" #743
1980
1981### Major Changes:
1982
1983- Transactions are immediately invoked as A+ promises, #470 (this is a feature and should not actually break anything in practice)
1984- Heavy refactoring internal APIs (public APIs should not be affected)
1985
1986### "Other Changes:
1987
1988- Allow mysql2 to use non-default port, #588
1989- Support creating & dropping extensions in PostgreSQL, #540
1990- CLI support for knexfiles that do not provide environment keys, #527
1991- Added sqlite3 dialect version of whereRaw/andWhereRaw (#477)
1992
1993# 0.7.5 - Mar 9, 2015
1994
1995- Fix bug in validateMigrationList, (#697)
1996
1997# 0.7.4 - Feb 25, 2015
1998
1999- Fix incorrect order of query parameters when using subqueries, #704
2000- Properly handle limit 0, (#655)
2001- Apply promise args from then instead of [explicitly passing](https://github.com/petkaantonov/bluebird/issues/482).
2002- Respect union parameter as last argument (#660).
2003- Added sqlite3 dialect version of whereRaw/andWhereRaw (#477).
2004- Fix SQLite dropColumn doesn't work for last column (#544).
2005- Add POSIX operator support for Postgres (#562)
2006- Sample seed files now correctly (#391)
2007
2008# 0.7.3 - Oct 3, 2014
2009
2010- Support for `join(table, rawOrBuilder)` syntax.
2011- Fix for regression in PostgreSQL connection (#516)
2012
2013# 0.7.2 - Oct 1, 2014
2014
2015- Fix for regression in migrations
2016
2017# 0.7.1 - Oct 1, 2014
2018
2019- Better disconnect handling & pool removal for MySQL clients, #452
2020
2021# 0.7.0 - Oct 1, 2014
2022
2023### New Features:
2024
2025- Oracle support, #419
2026- Database seed file support, #391
2027- Improved support for sub-raw queries within raw statements
2028
2029### Breaking Changes:
2030
2031- "collate nocase" no longer used by default in sqlite3 #396
2032
2033### Other Changes:
2034
2035- Bumping Bluebird to ^2.x
2036- Transactions in websql are now a no-op (unsupported) #375
2037- Improved test suite
2038- knex.fn namespace as function helper (knex.fn.now), #372
2039- Better handling of disconnect errors
2040- Support for offset without limit, #446
2041- Chainable first method for mysql schema, #406
2042- Support for empty array in `whereIn`
2043- Create/drop schema for postgres, #511
2044- Inserting multiple rows with default values, #468
2045- Join columns are optional for cross-join, #508
2046- Flag for creating jsonb columns in Postgresql, #500
2047
2048# 0.6.22 - July 10, 2014
2049
2050- Bug fix for properly binding postgresql streaming queries, (#363)
2051
2052# 0.6.21 - July 9, 2014
2053
2054- Bug fix for raw queries not being transaction context aware, (#351).
2055- Properly forward stream errors in sqlite3 runner, (#359)
2056
2057# 0.6.20 - June 30, 2014
2058
2059- Allow case insensitive operators in sql clauses, (#344)
2060
2061# 0.6.19 - June 27, 2014
2062
2063- Add `groupByRaw` / `orderByRaw` methods, better support for raw statements in group / order (#282).
2064- Support more config options for node-mysql2 dialect (#341).
2065- CLI help text fix, (#342)
2066
2067# 0.6.18 - June 25, 2014
2068
2069- Patch for the method, calling without a handler should return the stream, not a promise (#337)
2070
2071# 0.6.17 - June 23, 2014
2072
2073- Adding missing map / reduce proxies to bluebird's implementation
2074
2075# 0.6.16 - June 18, 2014
2076
2077- Increment / decrement returns the number of affectedRows (#330).
2078- Allow --cwd option flag to be passed to CLI tool (#326)
2079
2080# 0.6.15 - June 14, 2014
2081
2082- Added the as method for aliasing subqueries
2083
2084# 0.6.14 - June 14, 2014
2085
2086- whereExists / whereNotExists may now take a query builder instance as well as a callback
2087
2088# 0.6.13 - June 12, 2014
2089
2090- Fix regression with onUpdate / onDelete in PostgreSQL, (#308).
2091- Add missing `Promise` require to knex.js, unit test for knex.destroy (#314)
2092
2093# 0.6.12 - June 10, 2014
2094
2095- Fix for regression with boolean default types in PostgreSQL
2096
2097# 0.6.11 - June 10, 2014
2098
2099- Fix for regression with queries containing multiple order by statements in sqlite3
2100
2101# 0.6.10 - June 10, 2014
2102
2103- Fix for big regression in memoization of column names from 0.5 -> 0.6
2104
2105# 0.6.9 - June 9, 2014
2106
2107- Fix for regression in specificType method
2108
2109# 0.6.8 - June 9, 2014
2110
2111- Package.json fix for CLI
2112
2113# 0.6.7 - June 9, 2014
2114
2115- Adds support for [node-mysql2](https://github.com/sidorares/node-mysql2) library.
2116- Bundles CLI with the knex install, various related migrate CLI fixes
2117
2118# 0.6.6 - June 9, 2014
2119
2120- console.warn rather than throw when adding foreignKeys in SQLite3.
2121- Add support for dropColumn in SQLite3.
2122- Document `raw.wrap`
2123
2124# 0.6.5 - June 9, 2014
2125
2126- Add missing \_ require to WebSQL builds
2127
2128# 0.6.4 - June 9, 2014
2129
2130- Fix & document schema.raw method
2131
2132# 0.6.3 - June 6, 2014
2133
2134- Schema methods on transaction object are now transaction aware (#301).
2135- Fix for resolved value from transactions, (#298).
2136- Undefined columns are not added to builder
2137
2138# 0.6.2 - June 4, 2014
2139
2140- Fix regression in raw query output, (#297).
2141- Fix regression in "pluck" method (#296).
2142- Document [first](#Builder-first) method
2143
2144# 0.6.1 - June 4, 2014
2145
2146- Reverting to using .npmignore, the "files" syntax forgot the knex.js file
2147
2148# 0.6.0 - June 4, 2014
2149
2150### Major Library refactor:
2151
2152- Major internal overhaul to clean up the various dialect code.
2153- Improved unit test suite.
2154- Support for the [mariasql](https://github.com/mscdex/node-mariasql) driver.
2155- More consistent use of raw query bindings throughout the library.
2156- Queries are more composable, may be injected in various points throughout the builder.
2157- Added [streaming](#Interfaces-Streams) interface
2158- Deprecated 5 argument [join](#Builder-join) in favor of additional join methods.
2159- The wrapValue function to allow for array column operations in PostgreSQL (#287).
2160- An explicit connection can be passed for any query (#56).
2161- Drop column support for sqlite3
2162- All schema actions are run sequentially on the same connection if chained.
2163- Schema actions can now be wrapped in a transaction
2164- `.references(tableName.columnName)` as shorthand for `.references(columnName).inTable(tableName)`
2165- `.join('table.column', 'otherTable.column')` as shorthand for .join('table.column', '=', 'otherTable.column')
2166- Streams are supported for selects, passing through to the streaming capabilities of node-mysql and node-postgres
2167- For More information, see this [pull-request](https://github.com/tgriesser/knex/pull/252)
2168
2169# 0.5.15 - June 4, 2014
2170
2171- Dropped indexes feature now functions correctly, (#278)
2172
2173# 0.5.14 - May 6, 2014
2174
2175- 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
2176
2177# 0.5.13 - April 2, 2014
2178
2179- Fix regression in array bindings for postgresql (#228)
2180
2181# 0.5.12 - Mar 31, 2014
2182
2183- Add more operators for where clauses, including && (#226)
2184
2185# 0.5.11 - Mar 25, 2014
2186
2187- `.where(col, 'is', null)` or `.where(col, 'is not', null)` are not supported (#221).
2188- Case insensitive `where` operators now allowed (#212).
2189- Fix bug in increment/decrement truncating to an integer (#210).
2190- Disconnected connections are now properly handled & removed from the pool (#206).
2191- Internal tweaks to binding concatenations for performance (#207)
2192
2193# 0.5.10 - Mar 19, 2014
2194
2195- Add the .exec method to the internal promise shim
2196
2197# 0.5.9 - Mar 18, 2014
2198
2199- Remove error'ed connections from the connection pool (#206), added support for node-postgres-pure (pg.js) (#200)
2200
2201# 0.5.8 - Feb 27, 2014
2202
2203- Fix for chaining on forUpdate / forShare, adding map & reduce from bluebird
2204
2205# 0.5.7 - Feb 18, 2014
2206
2207- Fix for a null limit / offset breaking query chain (#182)
2208
2209# 0.5.6 - Feb 5, 2014
2210
2211- Bump bluebird dependency to ~1.0.0, fixing regression in Bluebird 1.0.2 (#176)
2212
2213# 0.5.5 - Jan 28, 2014
2214
2215- Fix for the exit code on the migrations cli (#151).
2216- The `init` method in `knex.migrate` now uses `this.config` if one isn't passed in (#156)
2217
2218# 0.5.4 - Jan 7, 2014
2219
2220- Fix for using raw statements in defaultTo schema builder methods (#146)
2221
2222# 0.5.3 - Jan 2, 2014
2223
2224- Fix for incorrectly formed sql when aggregates are used with columns (#144)
2225
2226# 0.5.2 - Dec 18, 2013
2227
2228- Adding passthrough "catch", "finally" to bluebird implementations, use bluebird's "nodeify" internally for exec
2229
2230# 0.5.1 - Dec 12, 2013
2231
2232- 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)
2233- Added `bigint` and `bigserial` type to PostgreSQL. (#111)
2234- Fix for the [specificType](#Schema-specificType) schema call (#118)
2235- 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)
2236
2237# 0.5.0 - Nov 25, 2013
2238
2239- Initial pass at a [migration](#Migrations) api.
2240- Aggregate methods are no longer aliased as "aggregate", but may now be aliased and have more than one aggregate in a query (#108, #110).
2241- Adding bigint and bigserial to PostgreSQL (#111).
2242- Bugfix on increment/decrement values (#100).
2243- Bugfix with having method (#107).
2244- Switched from when.js to [bluebird](https://github.com/petkaantonov/bluebird) for promise implementation, with shim for backward compatibility.
2245- Switched from underscore to lodash, for semver reliability
2246
2247# 0.4.13 - Oct 31, 2013
2248
2249- Fix for aggregate methods on toString and clone, (#98)
2250
2251# 0.4.12 - Oct 29, 2013
2252
2253- Fix incorrect values passed to float in MySQL and decimal in PostgreSQL
2254
2255# 0.4.11 - Oct 15, 2013
2256
2257- Fix potential sql injection vulnerability in orderBy, thanks to @sebgie
2258
2259# 0.4.10 - Oct 14, 2013
2260
2261- Added [forUpdate](#Builder-forUpdate) and [forShare](#Builder-forShare) for select modes in transactions. (#84)
2262- Fix bug where current query chain type is not copied on [clone](#Builder-clone). (#90)
2263- Charset and collate are now added as methods on the schema builder. (#89)
2264- Added `into` as an alias of [from](#Builder-from), for builder syntax of: `insert(value).into(tableName)`
2265- Internal pool fixes. (#90)
2266
2267# 0.4.9 - Oct 7, 2013
2268
2269- Fix for documentation of [hasColumn](#Schema-hasColumn), ensure that `hasColumn` works with MySQL (#87).
2270- More cleanup of error messages, showing the original error message concatenated with the sql and bindings
2271
2272# 0.4.8 - Oct 2, 2013
2273
2274- Connections are no longer pushed back into the pool if they never existed to begin with (#85)
2275
2276# 0.4.7 - Sep 27, 2013
2277
2278- The column is now a documented method on the builder api, and takes either an individual column or an array of columns to select
2279
2280# 0.4.6 - Sep 25, 2013
2281
2282- Standardizing handling of errors for easier debugging, as noted in (#39)
2283
2284# 0.4.5 - Sep 24, 2013
2285
2286- Fix for hasTable always returning true in MySQL (#82), fix where sql queries were duplicated with multiple calls on toSql with the schema builder
2287
2288# 0.4.4 - Sep 22, 2013
2289
2290- Fix for debug method not properly debugging individual queries
2291
2292# 0.4.3 - Sep 18, 2013
2293
2294- Fix for underscore not being defined in various grammar files
2295
2296# 0.4.2 - Sep 17, 2013
2297
2298- 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
2299
2300# 0.4.1 - Sep 16, 2013
2301
2302- 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
2303
2304# 0.4.0 - Sep 13, 2013
2305
2306### Breaking Changes:
2307
2308- 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.
2309- Lowercasing of `knex.raw`, `knex.transaction`, and `knex.schema`.
2310- Created columns are now nullable by default, unless `notNullable` is chained as an option.
2311- Keys created with `increments` are now assumed to be unsigned (MySQL) by default.
2312- 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`
2313
2314# 0.2.6 - Aug 29, 2013
2315
2316- Reject the transaction promise if the transaction "commit" fails, (#50)
2317
2318# 0.2.5 - Aug 25, 2013
2319
2320- Fix error if a callback isn't specified for exec, (#49)
2321
2322# 0.2.4 - Aug 22, 2013
2323
2324- Fix SQLite3 delete not returning affected row count, (#45)
2325
2326# 0.2.3 - Aug 22, 2013
2327
2328- Fix insert with default values in PostgreSQL and SQLite3, (#44)
2329
2330# 0.2.2 - Aug 20, 2013
2331
2332- Allowing Raw queries to be passed as the primary table names
2333
2334# 0.2.1 - Aug 13, 2013
2335
2336- Fix for an array passed to insert being mutated
2337
2338# 0.2.0 - Aug 7, 2013
2339
2340### Breaking changes:
2341
2342- [hasTable](#Schema-hasTable) now returns a boolean rather than a failed promise.
2343- 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.
2344- The [timestamp](#Schema-timestamp) method on the schema builder now uses a `dateTime` rather than a `timestamp`
2345
2346# 0.1.8 - July 7, 2013
2347
2348- Somehow missing the != operator. Using _.find rather than _.where in getCommandsByName(#22)
2349
2350# 0.1.7 - June 12, 2013
2351
2352- Ensures unhandled errors in the exec callback interface are re-thrown
2353
2354# 0.1.6 - June 9, 2013
2355
2356- Renaming beforeCreate to afterCreate. Better handling of errors in the connection pooling
2357
2358# 0.1.5 - June 9, 2013
2359
2360- 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
2361
2362# 0.1.4 - May 22, 2013
2363
2364- defaultTo now accepts "false" for boolean columns, allows for empty strings as default values
2365
2366# 0.1.3 - May 18, 2013
2367
2368- Enabling table aliases (#11). Fix for issues with transactions not functioning (#12)
2369
2370# 0.1.2 - May 15, 2013
2371
2372- Bug fixes for groupBy (#7). Mysql using collation, charset config settings in createTable. Added engine on schemaBuilder specifier (#6). Other doc fixes, tests
2373
2374# 0.1.1 - May 14, 2013
2375
2376- 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
2377
2378# 0.1.0 - May 13, 2013
2379
2380- Initial Knex release