db-migrate 1.0.0-beta.16

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 (51) hide show
  1. package/CHANGELOG.md +487 -0
  2. package/LICENSE +22 -0
  3. package/README.md +100 -0
  4. package/api.js +463 -0
  5. package/bin/db-migrate +39 -0
  6. package/connect.js +198 -0
  7. package/get.js +67 -0
  8. package/index.js +85 -0
  9. package/lib/chain.js +157 -0
  10. package/lib/class.js +75 -0
  11. package/lib/commands/check.js +52 -0
  12. package/lib/commands/create-migration.js +252 -0
  13. package/lib/commands/db.js +63 -0
  14. package/lib/commands/down.js +45 -0
  15. package/lib/commands/dump.js +22 -0
  16. package/lib/commands/fn/plugin.js +45 -0
  17. package/lib/commands/generated.js +32 -0
  18. package/lib/commands/helper/assert.js +15 -0
  19. package/lib/commands/helper/load-config.js +26 -0
  20. package/lib/commands/helper/migration-hook.js +4 -0
  21. package/lib/commands/helper/register-events.js +19 -0
  22. package/lib/commands/index.js +9 -0
  23. package/lib/commands/on-complete.js +28 -0
  24. package/lib/commands/run.js +122 -0
  25. package/lib/commands/seed.js +48 -0
  26. package/lib/commands/set-default-argv.js +169 -0
  27. package/lib/commands/sync.js +52 -0
  28. package/lib/commands/undo-seed.js +54 -0
  29. package/lib/commands/up.js +52 -0
  30. package/lib/config.js +207 -0
  31. package/lib/driver/index.js +156 -0
  32. package/lib/driver/shadow.js +74 -0
  33. package/lib/executors/versioned/v1.js +48 -0
  34. package/lib/executors/versioned/v2.js +78 -0
  35. package/lib/file.js +190 -0
  36. package/lib/interface/migratorInterface.js +127 -0
  37. package/lib/interface/seederInterface.js +145 -0
  38. package/lib/learn.js +369 -0
  39. package/lib/methods/v2/conventions.js +47 -0
  40. package/lib/methods/v2/migrate.js +5 -0
  41. package/lib/methods/v2/statetravel.js +86 -0
  42. package/lib/methods/v2/translatestate.js +117 -0
  43. package/lib/relation.js +37 -0
  44. package/lib/state.js +154 -0
  45. package/lib/template.js +312 -0
  46. package/lib/templates/v2.js +12 -0
  47. package/lib/temputils.js +62 -0
  48. package/lib/walker.js +266 -0
  49. package/package.json +87 -0
  50. package/pnpm-lock.yaml +2574 -0
  51. package/te.js +70 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,487 @@
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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Tobias Gurtzick
2
+
3
+ Copyright (c) 2013 Jeff Kunkle
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,100 @@
1
+ [![Backers on Open Collective](https://opencollective.com/node-db-migrate/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/node-db-migrate/sponsors/badge.svg)](#sponsors)
2
+ [![Build Status](https://travis-ci.org/db-migrate/node-db-migrate.svg?branch=master)](https://travis-ci.org/db-migrate/node-db-migrate)
3
+ [![Dependency Status](https://david-dm.org/db-migrate/node-db-migrate.svg)](https://david-dm.org/db-migrate/node-db-migrate)
4
+ [![devDependency Status](https://david-dm.org/db-migrate/node-db-migrate/dev-status.svg)](https://david-dm.org/db-migrate/node-db-migrate#info=devDependencies)
5
+ [![Documentation Status](https://readthedocs.org/projects/db-migrate/badge/?version=latest)](https://readthedocs.org/projects/db-migrate/?badge=latest)
6
+ [![Code Quality: Javascript](https://img.shields.io/lgtm/grade/javascript/g/db-migrate/node-db-migrate.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/db-migrate/node-db-migrate/context:javascript)
7
+ [![Total Alerts](https://img.shields.io/lgtm/alerts/g/db-migrate/node-db-migrate.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/db-migrate/node-db-migrate/alerts)
8
+
9
+ # db-migrate
10
+
11
+ [![Join the chat at https://gitter.im/db-migrate/node-db-migrate](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/db-migrate/node-db-migrate?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
12
+
13
+ [![NPM](https://nodei.co/npm/db-migrate.png?downloads=true&downloadRank=true)](https://nodei.co/npm/db-migrate/)
14
+
15
+ Database migration framework for node.js
16
+
17
+ # Platinum sponsors
18
+
19
+ [<img src="https://www.wizardtales.com/wzrdtales.png" width="100">](https://www.wizardtales.com)
20
+
21
+ [Details about sponsorships](https://github.com/db-migrate/node-db-migrate/issues/605)
22
+
23
+ Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/node-db-migrate#sponsor)] or reach out to magic+dbsponsorship@wizardtales.com.
24
+
25
+ # Usage
26
+
27
+ ## Installation
28
+
29
+ $ npm install -g db-migrate
30
+
31
+ DB-Migrate is now available to you via:
32
+
33
+ $ db-migrate
34
+
35
+ ### As local module
36
+
37
+ Want to use db-migrate as local module?
38
+
39
+ $ npm install db-migrate
40
+
41
+ DB-Migrate is now available to you via:
42
+
43
+ $ node node_modules/db-migrate/bin/db-migrate
44
+
45
+ ## Officially Supported Databases
46
+
47
+ - Mysql (https://github.com/felixge/node-mysql)
48
+ https://github.com/db-migrate/mysql
49
+ - PostgreSQL (https://github.com/brianc/node-postgres)
50
+ https://github.com/db-migrate/pg
51
+ - sqlite3 (https://github.com/developmentseed/node-sqlite3)
52
+ https://github.com/db-migrate/sqlite
53
+ - Mongodb (https://github.com/mongodb/node-mongodb-native)
54
+ https://github.com/db-migrate/mongodb
55
+
56
+ ## Resources and usage instructions
57
+
58
+ Please follow the link below, for usage instructions examples and the full
59
+ documentation of db-migrate.
60
+
61
+ Documentation: https://db-migrate.readthedocs.io/en/latest/
62
+
63
+ # Support db-migrate
64
+
65
+ ## Backers
66
+
67
+ A big thank you to our backers. You're a tremendous and important help, to keep the project healthy! [[Become a backer](https://opencollective.com/node-db-migrate#backer)]
68
+
69
+ <a href="https://opencollective.com/node-db-migrate#backers" target="_blank"><img src="https://opencollective.com/node-db-migrate/backers.svg?width=890"></a>
70
+
71
+ ## Sponsors
72
+
73
+ Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/node-db-migrate#sponsor)] or reach out to magic+dbsponsorship@wizardtales.com.
74
+
75
+ ## License
76
+
77
+ (The MIT License)
78
+
79
+ Copyright (c) 2015 Tobias Gurtzick
80
+
81
+ Copyright (c) 2013 Jeff Kunkle
82
+
83
+ Permission is hereby granted, free of charge, to any person obtaining
84
+ a copy of this software and associated documentation files (the
85
+ "Software"), to deal in the Software without restriction, including
86
+ without limitation the rights to use, copy, modify, merge, publish,
87
+ distribute, sublicense, and/or sell copies of the Software, and to
88
+ permit persons to whom the Software is furnished to do so, subject to
89
+ the following conditions:
90
+
91
+ The above copyright notice and this permission notice shall be
92
+ included in all copies or substantial portions of the Software.
93
+
94
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
95
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
96
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
97
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
98
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
99
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
100
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.