knex 3.0.1 → 3.2.0

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