db-migrate 1.0.0-beta.9 → 1.0.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.
package/CHANGELOG.md DELETED
@@ -1,487 +0,0 @@
1
- # [1.0.0-beta.2](https://github.com/db-migrate/node-db-migrate/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2019-06-11)
2
-
3
-
4
-
5
- # [1.0.0-beta.1](https://github.com/db-migrate/node-db-migrate/compare/v1.0.0-beta.0...v1.0.0-beta.1) (2019-06-11)
6
-
7
-
8
- ### Bug Fixes
9
-
10
- * **learn:** respect column arrays for indizies ([3649d69](https://github.com/db-migrate/node-db-migrate/commit/3649d69))
11
-
12
-
13
-
14
- # [1.0.0-beta.0](https://github.com/db-migrate/node-db-migrate/compare/v0.11.5...v1.0.0-beta.0) (2019-06-08)
15
-
16
-
17
- ### Bug Fixes
18
-
19
- * **cwd:** addition of cwd missed function definition ([7c238a4](https://github.com/db-migrate/node-db-migrate/commit/7c238a4))
20
- * **plugin:** handle non existent dependencies and improve UX ([91b9da9](https://github.com/db-migrate/node-db-migrate/commit/91b9da9)), closes [#628](https://github.com/db-migrate/node-db-migrate/issues/628)
21
- * **plugin:** respect options cwd ([#618](https://github.com/db-migrate/node-db-migrate/issues/618)) ([3a8a09f](https://github.com/db-migrate/node-db-migrate/commit/3a8a09f))
22
- * **reset:** regression introduced in check functionality ([61ca5bb](https://github.com/db-migrate/node-db-migrate/commit/61ca5bb)), closes [#552](https://github.com/db-migrate/node-db-migrate/issues/552)
23
- * **scope:** new scoping errored out when using templates ([b2421e3](https://github.com/db-migrate/node-db-migrate/commit/b2421e3))
24
- * **utils:** resolve when returned null ([68361fe](https://github.com/db-migrate/node-db-migrate/commit/68361fe))
25
- * **walker:** rename interface to Interface ([6234d42](https://github.com/db-migrate/node-db-migrate/commit/6234d42))
26
-
27
-
28
- ### Features
29
-
30
- * **chain:** add step chaining ([8203c55](https://github.com/db-migrate/node-db-migrate/commit/8203c55))
31
- * **error handling:** added advanced error handling and rollback ([aa13a35](https://github.com/db-migrate/node-db-migrate/commit/aa13a35))
32
- * **learning:** add db learning ([d5c9aa1](https://github.com/db-migrate/node-db-migrate/commit/d5c9aa1))
33
- * **migration:** add support for first basic options on new schema ([d891628](https://github.com/db-migrate/node-db-migrate/commit/d891628))
34
- * **schemav2:** add foreignKey support on tables ([3dd7158](https://github.com/db-migrate/node-db-migrate/commit/3dd7158))
35
- * **state:** add state manager and adjust driver functions ([10c3f1a](https://github.com/db-migrate/node-db-migrate/commit/10c3f1a))
36
- * **statemanager:** add first edition of state manager ([6dc4d3b](https://github.com/db-migrate/node-db-migrate/commit/6dc4d3b)), closes [#538](https://github.com/db-migrate/node-db-migrate/issues/538)
37
-
38
-
39
-
40
- ## [0.11.6](https://github.com/db-migrate/node-db-migrate/compare/v0.11.5...v0.11.6) (2019-06-08)
41
-
42
-
43
- ### Bug Fixes
44
-
45
- * **cwd:** addition of cwd missed function definition ([fae85cf](https://github.com/db-migrate/node-db-migrate/commit/fae85cf))
46
- * **plugin:** allow no package.json ([f27dce0](https://github.com/db-migrate/node-db-migrate/commit/f27dce0))
47
- * **plugin:** handle non existent dependencies and improve UX ([006ef5e](https://github.com/db-migrate/node-db-migrate/commit/006ef5e)), closes [#628](https://github.com/db-migrate/node-db-migrate/issues/628)
48
- * **plugin:** respect options cwd ([#618](https://github.com/db-migrate/node-db-migrate/issues/618)) ([3dae762](https://github.com/db-migrate/node-db-migrate/commit/3dae762))
49
-
50
-
51
- <a name="0.11.5"></a>
52
- ## [0.11.5](https://github.com/db-migrate/node-db-migrate/compare/v0.11.4...v0.11.5) (2019-01-06)
53
-
54
-
55
- ### Bug Fixes
56
-
57
- * **db:** set exit code as 1 only on error ([3148cc9](https://github.com/db-migrate/node-db-migrate/commit/3148cc9))
58
- * Added warning on plugin loading failure ([fcffd62](https://github.com/db-migrate/node-db-migrate/commit/fcffd62))
59
- * **lgtm:** fix errors ([4cd5558](https://github.com/db-migrate/node-db-migrate/commit/4cd5558))
60
-
61
-
62
-
63
- <a name="0.11.3"></a>
64
- ## [0.11.3](https://github.com/db-migrate/node-db-migrate/compare/v0.11.2...v0.11.3) (2018-09-08)
65
-
66
-
67
- ### Bug Fixes
68
-
69
- * **db:** create and drop always result in exit code 1 ([d32644c](https://github.com/db-migrate/node-db-migrate/commit/d32644c)), closes [#550](https://github.com/db-migrate/node-db-migrate/issues/550)
70
-
71
-
72
-
73
- <a name="0.11.2"></a>
74
- ## [0.11.2](https://github.com/db-migrate/node-db-migrate/compare/v0.10.0...v0.11.2) (2018-09-05)
75
-
76
-
77
- ### Bug Fixes
78
-
79
- * **check:** fix check via API not passing results to the callback ([b743696](https://github.com/db-migrate/node-db-migrate/commit/b743696))
80
- * **ci:** add ignores for backported features ([21c3eb9](https://github.com/db-migrate/node-db-migrate/commit/21c3eb9))
81
- * **db:** wrong reference to connect causes db:create to fail ([991ee76](https://github.com/db-migrate/node-db-migrate/commit/991ee76)), closes [#520](https://github.com/db-migrate/node-db-migrate/issues/520)
82
- * **exitCode:** wrong check for existence fixed ([3c6fc33](https://github.com/db-migrate/node-db-migrate/commit/3c6fc33))
83
- * **exitCode:** wrong exit code on db methods ([486cb78](https://github.com/db-migrate/node-db-migrate/commit/486cb78)), closes [#534](https://github.com/db-migrate/node-db-migrate/issues/534)
84
- * **insert:** add missing insert entry to interface ([7ca2f56](https://github.com/db-migrate/node-db-migrate/commit/7ca2f56)), closes [#542](https://github.com/db-migrate/node-db-migrate/issues/542)
85
- * Update dependency `rc` to latest version ([b343add](https://github.com/db-migrate/node-db-migrate/commit/b343add))
86
- * **log:** error ended up in unreadable errors ([16512f6](https://github.com/db-migrate/node-db-migrate/commit/16512f6)), closes [#524](https://github.com/db-migrate/node-db-migrate/issues/524) [#521](https://github.com/db-migrate/node-db-migrate/issues/521)
87
- * **progamableApi:** cmdOptions get passed into setDefaultArgv now ([cb88b58](https://github.com/db-migrate/node-db-migrate/commit/cb88b58))
88
- * **reset:** regression introduced in check functionality ([b94db96](https://github.com/db-migrate/node-db-migrate/commit/b94db96)), closes [#552](https://github.com/db-migrate/node-db-migrate/issues/552)
89
- * **switchDatabase:** no error was thrown on scope switch ([392d88c](https://github.com/db-migrate/node-db-migrate/commit/392d88c)), closes [#470](https://github.com/db-migrate/node-db-migrate/issues/470)
90
- * update vulnerable pack 'deep-extend' and OOD deps ([8e13c7f](https://github.com/db-migrate/node-db-migrate/commit/8e13c7f))
91
-
92
-
93
- ### Features
94
-
95
- * **check:** add check functionality to determine migrations to run ([56acdb9](https://github.com/db-migrate/node-db-migrate/commit/56acdb9))
96
- * **contribution:** enrich contribution instructions ([2cd0578](https://github.com/db-migrate/node-db-migrate/commit/2cd0578)), closes [#549](https://github.com/db-migrate/node-db-migrate/issues/549)
97
- * **contribution:** enrich contribution instructions, issues ([5ee386b](https://github.com/db-migrate/node-db-migrate/commit/5ee386b))
98
- * **issuetemplate:** added a github issue template ([3c0fcbf](https://github.com/db-migrate/node-db-migrate/commit/3c0fcbf))
99
- * **progamableApi:** CMD options can be passed programatically now ([fd8562e](https://github.com/db-migrate/node-db-migrate/commit/fd8562e))
100
- * **progamableApi:** using const now ([d761ebf](https://github.com/db-migrate/node-db-migrate/commit/d761ebf))
101
-
102
-
103
-
104
- <a name="0.11.1"></a>
105
- ## [0.11.1](https://github.com/db-migrate/node-db-migrate/compare/v0.11.0...v0.11.1) (2018-04-10)
106
-
107
-
108
- ### Bug Fixes
109
-
110
- * **reset:** regression introduced in check functionality ([d8a735d](https://github.com/db-migrate/node-db-migrate/commit/d8a735d)), closes [#552](https://github.com/db-migrate/node-db-migrate/issues/552)
111
-
112
-
113
-
114
- <a name="0.11.0"></a>
115
- # [0.11.0](https://github.com/db-migrate/node-db-migrate/compare/v0.10.7...v0.11.0) (2018-04-10)
116
-
117
-
118
- ### Features
119
-
120
- * **check:** add check functionality to determine migrations to run ([93e9f18](https://github.com/db-migrate/node-db-migrate/commit/93e9f18))
121
-
122
-
123
-
124
- <a name="0.10.7"></a>
125
- ## [0.10.7](https://github.com/db-migrate/node-db-migrate/compare/v0.10.6...v0.10.7) (2018-03-27)
126
-
127
-
128
- ### Bug Fixes
129
-
130
- * **progamableApi:** cmdOptions get passed into setDefaultArgv now ([ebdd75d](https://github.com/db-migrate/node-db-migrate/commit/ebdd75d))
131
-
132
-
133
-
134
- <a name="0.10.6"></a>
135
- ## [0.10.6](https://github.com/db-migrate/node-db-migrate/compare/v0.10.5...v0.10.6) (2018-03-21)
136
-
137
-
138
- ### Bug Fixes
139
-
140
- * **ci:** add ignores for backported features ([53dedc2](https://github.com/db-migrate/node-db-migrate/commit/53dedc2))
141
-
142
-
143
- ### Features
144
-
145
- * **contribution:** enrich contribution instructions ([93b5cea](https://github.com/db-migrate/node-db-migrate/commit/93b5cea)), closes [#549](https://github.com/db-migrate/node-db-migrate/issues/549)
146
- * **contribution:** enrich contribution instructions, issues ([d87a734](https://github.com/db-migrate/node-db-migrate/commit/d87a734))
147
- * **progamableApi:** CMD options can be passed programatically now ([69d7605](https://github.com/db-migrate/node-db-migrate/commit/69d7605))
148
- * **progamableApi:** using const now ([a69e221](https://github.com/db-migrate/node-db-migrate/commit/a69e221))
149
-
150
-
151
-
152
- <a name="0.10.4"></a>
153
- ## [0.10.4](https://github.com/db-migrate/node-db-migrate/compare/v0.10.3...v0.10.4) (2018-02-06)
154
-
155
-
156
- ### Bug Fixes
157
-
158
- * **insert:** add missing insert entry to interface ([899b8bc](https://github.com/db-migrate/node-db-migrate/commit/899b8bc)), closes [#542](https://github.com/db-migrate/node-db-migrate/issues/542)
159
-
160
-
161
-
162
- <a name="0.10.3"></a>
163
- ## [0.10.3](https://github.com/db-migrate/node-db-migrate/compare/v0.10.2...v0.10.3) (2018-02-03)
164
-
165
-
166
- ### Bug Fixes
167
-
168
- * **db:** wrong reference to connect causes db:create to fail ([991ee76](https://github.com/db-migrate/node-db-migrate/commit/991ee76)), closes [#520](https://github.com/db-migrate/node-db-migrate/issues/520)
169
- * **exitCode:** wrong check for existence fixed ([3c6fc33](https://github.com/db-migrate/node-db-migrate/commit/3c6fc33))
170
- * **exitCode:** wrong exit code on db methods ([486cb78](https://github.com/db-migrate/node-db-migrate/commit/486cb78)), closes [#534](https://github.com/db-migrate/node-db-migrate/issues/534)
171
- * **log:** error ended up in unreadable errors ([16512f6](https://github.com/db-migrate/node-db-migrate/commit/16512f6)), closes [#524](https://github.com/db-migrate/node-db-migrate/issues/524) [#521](https://github.com/db-migrate/node-db-migrate/issues/521)
172
- * **switchDatabase:** no error was thrown on scope switch ([392d88c](https://github.com/db-migrate/node-db-migrate/commit/392d88c)), closes [#470](https://github.com/db-migrate/node-db-migrate/issues/470)
173
-
174
-
175
- ### Features
176
-
177
- * **issuetemplate:** added a github issue template ([3c0fcbf](https://github.com/db-migrate/node-db-migrate/commit/3c0fcbf))
178
-
179
-
180
-
181
- <a name="0.10.2"></a>
182
- ## [0.10.2](https://github.com/db-migrate/node-db-migrate/compare/v0.10.1...v0.10.2) (2017-12-01)
183
-
184
-
185
- ### Bug Fixes
186
-
187
- * **log:** error ended up in unreadable errors ([97de65d](https://github.com/db-migrate/node-db-migrate/commit/97de65d)), closes [#524](https://github.com/db-migrate/node-db-migrate/issues/524) [#521](https://github.com/db-migrate/node-db-migrate/issues/521)
188
-
189
-
190
-
191
- <a name="0.10.1"></a>
192
- ## [0.10.1](https://github.com/db-migrate/node-db-migrate/compare/v0.10.0...v0.10.1) (2017-11-27)
193
-
194
-
195
- ### Bug Fixes
196
-
197
- * **db:** wrong reference to connect causes db:create to fail ([56cb75a](https://github.com/db-migrate/node-db-migrate/commit/56cb75a)), closes [#520](https://github.com/db-migrate/node-db-migrate/issues/520)
198
-
199
- ## 0.10.0
200
-
201
- Note:
202
-
203
- This is a cornerstone release. It provides groundwork for many things to come and has worked
204
- on stability and flexibility, while mostly retaining backwards compatibility.
205
-
206
- This release was a rewrite of nearly the whole module. However backwards compatibility
207
- was mostly preeserved. Bug fixes wont be listed for this release, all subsequent releases
208
- will follow the angular standard to automatically generate changelogs.
209
-
210
- New Features:
211
- - Sync
212
- - Driverless Core
213
- - Plugin Hooks and overwrites
214
- - Adjusted migration schema, to allow specific setup routines
215
- - Version migration schemas itself for future iterations
216
- - Promise style migrations
217
- - Programmatic API
218
- - Restructered major parts of db-migrate
219
- - Transactional migrations
220
- - New configuration options
221
-
222
- Find a full list of features added here:
223
-
224
- https://github.com/db-migrate/node-db-migrate/issues?utf8=%E2%9C%93&q=milestone%3Av0.10.0
225
-
226
- # Old Changelogs
227
-
228
- ## 0.1.0
229
-
230
- New Features:
231
-
232
- - Added support for PostgreSQL (via Roman Ostolosh)
233
-
234
- ## 0.1.1
235
-
236
- Fix:
237
-
238
- - Fixed migration table creation for PostgreSQL (via Brandon Keene)
239
-
240
- ## 0.1.2
241
-
242
- Fix:
243
-
244
- - Fix string type for PostgreSQL #14 (via Matt Huggins)
245
- - Fix renameTable method for PostgreSQL #15 (via Roman Ostolosh)
246
-
247
- ## 0.1.3
248
-
249
- Fix:
250
- - Respect column length specification on column defs #16 (via Matt Huggins)
251
- - Allow default environment to be dev or development #17 (via Matt Huggins)
252
-
253
- ## 0.1.4
254
-
255
- Fix:
256
- - Fix migration table creation error on PostgreSQL >= 9.1 #20
257
- - Document length property on columns #19 (via Glen Mailer)
258
-
259
- ## 0.1.5
260
-
261
- Fix:
262
- - Add testing for all supported database drivers
263
- - Fix dropTable on PostgreSQL #21
264
- - Implement removeColumn and changeColumn for MySQL
265
-
266
- ## 0.2.0
267
-
268
- New Feature:
269
- - Expose currently running environment name #22
270
- - Added an insert method to the API #23
271
- - Add support for unknown column data types #34
272
-
273
- Fix:
274
- - Fixed error creating migration table #26
275
- - Fixed removeIndex error in MySQL #37
276
- - Fixed issue with tests using too many connections under PostgreSQL
277
- - Fixed error running migrations under sqlite3 #27
278
-
279
- ## 0.2.1
280
-
281
- Improvement:
282
- - Added compatibility for mysql-2.0.0-alpha driver #25
283
-
284
- ## 0.2.2
285
-
286
- Fix:
287
- - Fix default value error when using Postgres #43
288
-
289
- ## 0.2.3
290
-
291
- Fix:
292
- - Fix error when using mysql-2.0.0-alpha3 driver #44
293
-
294
- ## 0.2.4
295
-
296
- Fix:
297
- - Use --migrations-dir option when specified #47
298
- - Handle unique constraints in changeColumn() for postgres #46 (via @ryanmeador)
299
-
300
- ## 0.2.5
301
-
302
- Fix:
303
- - Fix randomly occuring migration sorting error on empty db #51
304
-
305
- ## 0.2.6
306
-
307
- Fix:
308
- - Fix db.removeIndex for MySQL #42 (via @aprobus)
309
- - Workaround for node-mysql bug felixge/node-mysql#289 #54 (via
310
- @aprobus)
311
-
312
- ## 0.2.7
313
-
314
- Fix:
315
- - Support process.env.DATABASE_URL for postgres, for use with Heroku #57 (via @garth)
316
-
317
- ## 0.2.8
318
-
319
- Improvement
320
- - Added support for additional MySQL data types #58 (via @jpravetz)
321
-
322
- ## 0.3.0
323
-
324
- Improvement:
325
- - Added support for MySQLs LONGTEXT #62 (via @joeferner)
326
-
327
- New Feature:
328
- - Added dry-run support for migrations #55 (via @joeferner)
329
-
330
- ## 0.3.1
331
-
332
- Improvement:
333
- - Added support for boolean data type #66 (via @trojanowski)
334
-
335
- ## 0.3.2
336
-
337
- Fix
338
- - Update error message when using an invalid data type #67 (via @swang)
339
-
340
- ## 0.4.0
341
-
342
- New Feature:
343
- - Added support for renameColumn in MySQL #80 (via @akinnunen)
344
-
345
- Improvement:
346
- - Added --version flag #73 (via @mcandre)
347
- - Lazily require migrations #77, #78 (via @btakita)
348
-
349
- Fix
350
- - Fixed typo in lib/driver/pg.js for BLOB datatype #76
351
-
352
- ## 0.4.1
353
-
354
- Improvement:
355
- - Add support for BIGINT data type #81
356
-
357
- ## 0.4.2
358
-
359
- Improvement:
360
- - Superficial changes based on JSHint report #85, #88 (via @mcandre)
361
- - Let DATABASE_URL configure any database #90 (via @pwnall)
362
-
363
- Fix:
364
- - Fix for postgres driver blindly recreating the migrations table #89 (via @sgibbons)
365
- - Mitigate `npm test` permission error #95 (via @mcandre)
366
-
367
- ## 0.5.0
368
-
369
- New Feature:
370
- - Support for database URLs in database.json #103 (via @miguelgrinberg)
371
- - Option to use native Postgres client #106 (via @olalonde)
372
-
373
- Improvement:
374
- - Updated README.md documentation #98 (via @acco)
375
-
376
- ## 0.5.1
377
-
378
- Improvement:
379
- - Add a force-exit flag #108 (via @codeaholics)
380
- - Provide close callback for MySQL driver #107 (via @codeaholics)
381
-
382
- ## 0.5.2
383
-
384
- Fix:
385
- - Add ability to create camel-cased column names for PostgreSQL #111 (via @virpool)
386
- - Add ability to make a unique index #110 (via @codeaholics)
387
-
388
- ## 0.5.3
389
-
390
- Fix:
391
- - Fixed bug setting default values to values that are falsy #114 (via @wbrady)
392
-
393
- ## 0.5.4
394
-
395
- Fix:
396
- - Add backticks to MySQL driver #114 (via @mstorgaard)
397
-
398
- ## 0.6.0
399
-
400
- New Feature:
401
- - Support varargs in runSql, all on mysql driver #119 (via @Gloridea)
402
- - Load Environment Variables specified in config file #118 (via @codyhanson)
403
- - Added CoffeeScript support for migrations #116 (via @DeniSix)
404
-
405
- Improvement:
406
- - Added date type for sqlite3 #121 (via @mrcsparker)
407
-
408
- Fix:
409
- - Fix postgres issue with camelCased column name definition #125 (via @virpool)
410
-
411
- ## 0.6.1
412
-
413
- Fix:
414
- - Fix two regressions related to runSql not accepting params as an
415
- array #127, #128
416
-
417
- ## 0.6.2
418
-
419
- Fix:
420
- - Fix add index downcasing table name in MySQL #126 (via @noazark)
421
- - Fix dry run on first migration #132 (via @jgoyon)
422
-
423
- Improvement:
424
- - Add decimal data type support
425
-
426
- ## 0.6.3
427
-
428
- Fix
429
- - Fix postgres issue with camelCased column name during insert #137 (via @tone81)
430
-
431
- ## 0.6.4
432
-
433
- Improvement:
434
- - Handle more than one single quote in string literals in a portable way #151 (via @szywon)
435
- - added date, char and smallint types for pg #150 (via @FabricioFFC)
436
- - better error handling for broken database.json files #149 (via @acruikshank)
437
-
438
- Fix:
439
- - Make compatible with coffee-script 1.7 #147 (via @jinze)
440
- - docs: the exports.down fn gets (db, callback) as params #144 (via @alxndr)
441
- - Fix for multiple single quotes in a string #143
442
-
443
- ## 0.7.0 (2014-08-01)
444
-
445
- Improvement:
446
- - Externalize db configuration for tests #180 (via @dlaxar)
447
- - Tightening up some js syntax #179 (via @paulomcnally)
448
- - Change down migrations to execute in order they were run #178 (via @ajkerr)
449
- - addForeignKey and removeForeignKey added to mysql #174 (via @JohanObrink)
450
- - Add ability to use .env file for config if present #170 (via @bvalosek)
451
-
452
- ## 0.7.1 (2014-08-05)
453
-
454
- Improvement:
455
- - allow addColumn to create primary keys #183 (via @lourenzo)
456
-
457
- ## 0.8.0 (2014-11-25)
458
-
459
- Improvement:
460
- - Allow changing schema for Postgres #153 (via @zoips)
461
- - Enable autoincrement even when emitting primary key #157 (via @kkurahar)
462
- - New option to auto-generate SQL files #160 (via @tuliomonteazul)
463
- - Allow dry run to work when there is no migration table #166 (via @jjshoe)
464
- - Add support for Postgres driver in DATABASE_URL #188 (via @saxicek)
465
- - Use JSON.stringify on non-string objects #185 (via @G3z)
466
- - Add back quotes around foreign key name #189 (via @sitnin)
467
- - Mask passwords in verbose logging #195 (via @Crotery)
468
-
469
- ## 0.9.0 (2015-02-14)
470
-
471
- Improvement:
472
- - Documentation improvements #223, #210, #199, #158, #138 (Tobias Gurtzick @wzrdtales)
473
- - Multiple Scope Support (@wzrdtales)
474
- - Fixed bug by generalizing the usage of automatic quoting over all current drivers #204, #140, #155 (@wzrdtales)
475
- - MongoDB Driver #205, 217 (Tom Calfish @toymachiner62)
476
- - Fix error db-migrate command not found, make db-migrate usable as global module #210, #138 (@wzrdtales)
477
- - Add coffeescript template #208 (@richardfickling)
478
- - Support for Postgresql foreign keys #203 (@dlaxar and @NOtherDev)
479
- - Add support to create new databases and schemas #196, #202 (@wzrdtales)
480
- - Add ability to change the migration table name #192 (@wzrdtales)
481
- - Fix bug with column unique specification #123 (@wzrdtales)
482
- - Added support for constraints on columns #35 (@wzrdtales)
483
- - Added reset functionality #221 (@wzrdtales)
484
- - Aliased "default" option to "env" #219 (@wzrdtales)
485
-
486
- Full log at:
487
- [v0.9.0](https://github.com/kunklejr/node-db-migrate/issues?q=milestone%3Av0.9.0)
package/get.js DELETED
@@ -1,67 +0,0 @@
1
- exports.migrate = async (db, opt) => {
2
- await db.get('test', {
3
- columns: ['column1']
4
- });
5
-
6
- /**
7
- * columns can be aliased
8
- */
9
- await db.get('test', {
10
- columns: {
11
- column1: 'maxima'
12
- }
13
- });
14
-
15
- /**
16
- * We avoid tapping into complicated languages to define
17
- * the where clause. Instead you just use SQL or mongo schema
18
- * depending on the db you use. If you want to provide genericity we will
19
- * suggest using helper libraries like sql2mongo or vice versa. This allows
20
- * flexibility and avoids also the need to learn to many new things and
21
- * reinventing the weel just for a translation layer in this case.
22
- */
23
- await db.get('test', {
24
- columns: {
25
- column1: 'maxima',
26
- column2: 'something'
27
- },
28
- search: 'maxima >= 12'
29
- });
30
-
31
- /**
32
- * However, the most simple operation we will support upfront. Everything
33
- * else can use tooling. We will provide a plugin hook so this can be in
34
- * doubt tightly integrated into the migrations.
35
- */
36
- await db.get('test', {
37
- columns: {
38
- column1: 'maxima',
39
- column2: 'something'
40
- },
41
- search: {
42
- maxima: 15
43
- }
44
- });
45
-
46
- /**
47
- * when doing more then searching, you want to access it in query mode.
48
- * You will have to write the whole definition by hand. This guarantees
49
- * that we still understand what is happening (type of operation), but
50
- * gives ultimate flexibility.
51
- *
52
- * The table param is optional, when using for example SQL it will not be
53
- * needed, databases like mongodb will need it however, so it might be
54
- * recommended as a best practice to not omit it, depending on how ultimate
55
- * the decision of the db is yet.
56
- *
57
- * Adding LIMITS yourself is possible, but leave this to db-migrate in doubt.
58
- */
59
- await db.get('test', {
60
- query: 'DISTINCT value1 FROM test' // select will be forcefully prepended so we always know this will only get data
61
- });
62
- };
63
-
64
- exports._meta = {
65
- version: 2,
66
- DML: true
67
- };