db-migrate 1.0.0-beta.2 → 1.0.0-beta.21

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 (50) hide show
  1. package/LICENSE +26 -0
  2. package/README.md +1 -15
  3. package/api.js +22 -15
  4. package/connect.js +6 -6
  5. package/index.js +10 -13
  6. package/lib/chain.js +66 -11
  7. package/lib/commands/check.js +3 -3
  8. package/lib/commands/create-migration.js +121 -28
  9. package/lib/commands/db.js +2 -0
  10. package/lib/commands/down.js +1 -1
  11. package/lib/commands/dump.js +22 -0
  12. package/lib/commands/generated.js +32 -0
  13. package/lib/commands/helper/register-events.js +2 -0
  14. package/lib/commands/run.js +4 -9
  15. package/lib/commands/set-default-argv.js +13 -15
  16. package/lib/commands/sync.js +3 -3
  17. package/lib/commands/up.js +3 -3
  18. package/lib/config.js +2 -2
  19. package/lib/driver/index.js +37 -11
  20. package/lib/executors/versioned/v2.js +13 -3
  21. package/lib/file.js +2 -4
  22. package/lib/learn.js +64 -31
  23. package/lib/methods/v2/conventions.js +47 -0
  24. package/lib/methods/v2/statetravel.js +11 -9
  25. package/lib/methods/v2/translatestate.js +45 -12
  26. package/lib/state.js +5 -5
  27. package/lib/template.js +34 -4
  28. package/lib/templates/v2.js +12 -0
  29. package/lib/temputils.js +8 -0
  30. package/lib/walker.js +17 -2
  31. package/package.json +29 -24
  32. package/.eslintrc +0 -8
  33. package/.jscsrc +0 -0
  34. package/.jshintignore +0 -2
  35. package/.jshintrc +0 -14
  36. package/.prettierrc +0 -3
  37. package/.tern-project +0 -7
  38. package/.travis.yml +0 -47
  39. package/CHANGELOG.md +0 -474
  40. package/CODE_OF_CONDUCT.md +0 -46
  41. package/CONTRIBUTING.md +0 -81
  42. package/Makefile +0 -8
  43. package/commitlint.config.js +0 -1
  44. package/lib/commands/transition.js +0 -5
  45. package/lib/transitions/1.js +0 -30
  46. package/lib/transitions/ask.js +0 -22
  47. package/lib/transitions/snippets/setup.sjs +0 -8
  48. package/lib/transitions/transitioner.js +0 -78
  49. package/lib/transitions/try-require.js +0 -113
  50. package/lib/transitions/update-version.js +0 -48
package/CHANGELOG.md DELETED
@@ -1,474 +0,0 @@
1
- # [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)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * **cwd:** addition of cwd missed function definition ([7c238a4](https://github.com/db-migrate/node-db-migrate/commit/7c238a4))
7
- * **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)
8
- * **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))
9
- * **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)
10
- * **scope:** new scoping errored out when using templates ([b2421e3](https://github.com/db-migrate/node-db-migrate/commit/b2421e3))
11
- * **utils:** resolve when returned null ([68361fe](https://github.com/db-migrate/node-db-migrate/commit/68361fe))
12
- * **walker:** rename interface to Interface ([6234d42](https://github.com/db-migrate/node-db-migrate/commit/6234d42))
13
-
14
-
15
- ### Features
16
-
17
- * **chain:** add step chaining ([8203c55](https://github.com/db-migrate/node-db-migrate/commit/8203c55))
18
- * **error handling:** added advanced error handling and rollback ([aa13a35](https://github.com/db-migrate/node-db-migrate/commit/aa13a35))
19
- * **learning:** add db learning ([d5c9aa1](https://github.com/db-migrate/node-db-migrate/commit/d5c9aa1))
20
- * **migration:** add support for first basic options on new schema ([d891628](https://github.com/db-migrate/node-db-migrate/commit/d891628))
21
- * **schemav2:** add foreignKey support on tables ([3dd7158](https://github.com/db-migrate/node-db-migrate/commit/3dd7158))
22
- * **state:** add state manager and adjust driver functions ([10c3f1a](https://github.com/db-migrate/node-db-migrate/commit/10c3f1a))
23
- * **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)
24
-
25
-
26
-
27
- ## [0.11.6](https://github.com/db-migrate/node-db-migrate/compare/v0.11.5...v0.11.6) (2019-06-08)
28
-
29
-
30
- ### Bug Fixes
31
-
32
- * **cwd:** addition of cwd missed function definition ([fae85cf](https://github.com/db-migrate/node-db-migrate/commit/fae85cf))
33
- * **plugin:** allow no package.json ([f27dce0](https://github.com/db-migrate/node-db-migrate/commit/f27dce0))
34
- * **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)
35
- * **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))
36
-
37
-
38
- <a name="0.11.5"></a>
39
- ## [0.11.5](https://github.com/db-migrate/node-db-migrate/compare/v0.11.4...v0.11.5) (2019-01-06)
40
-
41
-
42
- ### Bug Fixes
43
-
44
- * **db:** set exit code as 1 only on error ([3148cc9](https://github.com/db-migrate/node-db-migrate/commit/3148cc9))
45
- * Added warning on plugin loading failure ([fcffd62](https://github.com/db-migrate/node-db-migrate/commit/fcffd62))
46
- * **lgtm:** fix errors ([4cd5558](https://github.com/db-migrate/node-db-migrate/commit/4cd5558))
47
-
48
-
49
-
50
- <a name="0.11.3"></a>
51
- ## [0.11.3](https://github.com/db-migrate/node-db-migrate/compare/v0.11.2...v0.11.3) (2018-09-08)
52
-
53
-
54
- ### Bug Fixes
55
-
56
- * **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)
57
-
58
-
59
-
60
- <a name="0.11.2"></a>
61
- ## [0.11.2](https://github.com/db-migrate/node-db-migrate/compare/v0.10.0...v0.11.2) (2018-09-05)
62
-
63
-
64
- ### Bug Fixes
65
-
66
- * **check:** fix check via API not passing results to the callback ([b743696](https://github.com/db-migrate/node-db-migrate/commit/b743696))
67
- * **ci:** add ignores for backported features ([21c3eb9](https://github.com/db-migrate/node-db-migrate/commit/21c3eb9))
68
- * **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)
69
- * **exitCode:** wrong check for existence fixed ([3c6fc33](https://github.com/db-migrate/node-db-migrate/commit/3c6fc33))
70
- * **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)
71
- * **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)
72
- * Update dependency `rc` to latest version ([b343add](https://github.com/db-migrate/node-db-migrate/commit/b343add))
73
- * **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)
74
- * **progamableApi:** cmdOptions get passed into setDefaultArgv now ([cb88b58](https://github.com/db-migrate/node-db-migrate/commit/cb88b58))
75
- * **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)
76
- * **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)
77
- * update vulnerable pack 'deep-extend' and OOD deps ([8e13c7f](https://github.com/db-migrate/node-db-migrate/commit/8e13c7f))
78
-
79
-
80
- ### Features
81
-
82
- * **check:** add check functionality to determine migrations to run ([56acdb9](https://github.com/db-migrate/node-db-migrate/commit/56acdb9))
83
- * **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)
84
- * **contribution:** enrich contribution instructions, issues ([5ee386b](https://github.com/db-migrate/node-db-migrate/commit/5ee386b))
85
- * **issuetemplate:** added a github issue template ([3c0fcbf](https://github.com/db-migrate/node-db-migrate/commit/3c0fcbf))
86
- * **progamableApi:** CMD options can be passed programatically now ([fd8562e](https://github.com/db-migrate/node-db-migrate/commit/fd8562e))
87
- * **progamableApi:** using const now ([d761ebf](https://github.com/db-migrate/node-db-migrate/commit/d761ebf))
88
-
89
-
90
-
91
- <a name="0.11.1"></a>
92
- ## [0.11.1](https://github.com/db-migrate/node-db-migrate/compare/v0.11.0...v0.11.1) (2018-04-10)
93
-
94
-
95
- ### Bug Fixes
96
-
97
- * **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)
98
-
99
-
100
-
101
- <a name="0.11.0"></a>
102
- # [0.11.0](https://github.com/db-migrate/node-db-migrate/compare/v0.10.7...v0.11.0) (2018-04-10)
103
-
104
-
105
- ### Features
106
-
107
- * **check:** add check functionality to determine migrations to run ([93e9f18](https://github.com/db-migrate/node-db-migrate/commit/93e9f18))
108
-
109
-
110
-
111
- <a name="0.10.7"></a>
112
- ## [0.10.7](https://github.com/db-migrate/node-db-migrate/compare/v0.10.6...v0.10.7) (2018-03-27)
113
-
114
-
115
- ### Bug Fixes
116
-
117
- * **progamableApi:** cmdOptions get passed into setDefaultArgv now ([ebdd75d](https://github.com/db-migrate/node-db-migrate/commit/ebdd75d))
118
-
119
-
120
-
121
- <a name="0.10.6"></a>
122
- ## [0.10.6](https://github.com/db-migrate/node-db-migrate/compare/v0.10.5...v0.10.6) (2018-03-21)
123
-
124
-
125
- ### Bug Fixes
126
-
127
- * **ci:** add ignores for backported features ([53dedc2](https://github.com/db-migrate/node-db-migrate/commit/53dedc2))
128
-
129
-
130
- ### Features
131
-
132
- * **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)
133
- * **contribution:** enrich contribution instructions, issues ([d87a734](https://github.com/db-migrate/node-db-migrate/commit/d87a734))
134
- * **progamableApi:** CMD options can be passed programatically now ([69d7605](https://github.com/db-migrate/node-db-migrate/commit/69d7605))
135
- * **progamableApi:** using const now ([a69e221](https://github.com/db-migrate/node-db-migrate/commit/a69e221))
136
-
137
-
138
-
139
- <a name="0.10.4"></a>
140
- ## [0.10.4](https://github.com/db-migrate/node-db-migrate/compare/v0.10.3...v0.10.4) (2018-02-06)
141
-
142
-
143
- ### Bug Fixes
144
-
145
- * **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)
146
-
147
-
148
-
149
- <a name="0.10.3"></a>
150
- ## [0.10.3](https://github.com/db-migrate/node-db-migrate/compare/v0.10.2...v0.10.3) (2018-02-03)
151
-
152
-
153
- ### Bug Fixes
154
-
155
- * **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)
156
- * **exitCode:** wrong check for existence fixed ([3c6fc33](https://github.com/db-migrate/node-db-migrate/commit/3c6fc33))
157
- * **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)
158
- * **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)
159
- * **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)
160
-
161
-
162
- ### Features
163
-
164
- * **issuetemplate:** added a github issue template ([3c0fcbf](https://github.com/db-migrate/node-db-migrate/commit/3c0fcbf))
165
-
166
-
167
-
168
- <a name="0.10.2"></a>
169
- ## [0.10.2](https://github.com/db-migrate/node-db-migrate/compare/v0.10.1...v0.10.2) (2017-12-01)
170
-
171
-
172
- ### Bug Fixes
173
-
174
- * **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)
175
-
176
-
177
-
178
- <a name="0.10.1"></a>
179
- ## [0.10.1](https://github.com/db-migrate/node-db-migrate/compare/v0.10.0...v0.10.1) (2017-11-27)
180
-
181
-
182
- ### Bug Fixes
183
-
184
- * **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)
185
-
186
- ## 0.10.0
187
-
188
- Note:
189
-
190
- This is a cornerstone release. It provides groundwork for many things to come and has worked
191
- on stability and flexibility, while mostly retaining backwards compatibility.
192
-
193
- This release was a rewrite of nearly the whole module. However backwards compatibility
194
- was mostly preeserved. Bug fixes wont be listed for this release, all subsequent releases
195
- will follow the angular standard to automatically generate changelogs.
196
-
197
- New Features:
198
- - Sync
199
- - Driverless Core
200
- - Plugin Hooks and overwrites
201
- - Adjusted migration schema, to allow specific setup routines
202
- - Version migration schemas itself for future iterations
203
- - Promise style migrations
204
- - Programmatic API
205
- - Restructered major parts of db-migrate
206
- - Transactional migrations
207
- - New configuration options
208
-
209
- Find a full list of features added here:
210
-
211
- https://github.com/db-migrate/node-db-migrate/issues?utf8=%E2%9C%93&q=milestone%3Av0.10.0
212
-
213
- # Old Changelogs
214
-
215
- ## 0.1.0
216
-
217
- New Features:
218
-
219
- - Added support for PostgreSQL (via Roman Ostolosh)
220
-
221
- ## 0.1.1
222
-
223
- Fix:
224
-
225
- - Fixed migration table creation for PostgreSQL (via Brandon Keene)
226
-
227
- ## 0.1.2
228
-
229
- Fix:
230
-
231
- - Fix string type for PostgreSQL #14 (via Matt Huggins)
232
- - Fix renameTable method for PostgreSQL #15 (via Roman Ostolosh)
233
-
234
- ## 0.1.3
235
-
236
- Fix:
237
- - Respect column length specification on column defs #16 (via Matt Huggins)
238
- - Allow default environment to be dev or development #17 (via Matt Huggins)
239
-
240
- ## 0.1.4
241
-
242
- Fix:
243
- - Fix migration table creation error on PostgreSQL >= 9.1 #20
244
- - Document length property on columns #19 (via Glen Mailer)
245
-
246
- ## 0.1.5
247
-
248
- Fix:
249
- - Add testing for all supported database drivers
250
- - Fix dropTable on PostgreSQL #21
251
- - Implement removeColumn and changeColumn for MySQL
252
-
253
- ## 0.2.0
254
-
255
- New Feature:
256
- - Expose currently running environment name #22
257
- - Added an insert method to the API #23
258
- - Add support for unknown column data types #34
259
-
260
- Fix:
261
- - Fixed error creating migration table #26
262
- - Fixed removeIndex error in MySQL #37
263
- - Fixed issue with tests using too many connections under PostgreSQL
264
- - Fixed error running migrations under sqlite3 #27
265
-
266
- ## 0.2.1
267
-
268
- Improvement:
269
- - Added compatibility for mysql-2.0.0-alpha driver #25
270
-
271
- ## 0.2.2
272
-
273
- Fix:
274
- - Fix default value error when using Postgres #43
275
-
276
- ## 0.2.3
277
-
278
- Fix:
279
- - Fix error when using mysql-2.0.0-alpha3 driver #44
280
-
281
- ## 0.2.4
282
-
283
- Fix:
284
- - Use --migrations-dir option when specified #47
285
- - Handle unique constraints in changeColumn() for postgres #46 (via @ryanmeador)
286
-
287
- ## 0.2.5
288
-
289
- Fix:
290
- - Fix randomly occuring migration sorting error on empty db #51
291
-
292
- ## 0.2.6
293
-
294
- Fix:
295
- - Fix db.removeIndex for MySQL #42 (via @aprobus)
296
- - Workaround for node-mysql bug felixge/node-mysql#289 #54 (via
297
- @aprobus)
298
-
299
- ## 0.2.7
300
-
301
- Fix:
302
- - Support process.env.DATABASE_URL for postgres, for use with Heroku #57 (via @garth)
303
-
304
- ## 0.2.8
305
-
306
- Improvement
307
- - Added support for additional MySQL data types #58 (via @jpravetz)
308
-
309
- ## 0.3.0
310
-
311
- Improvement:
312
- - Added support for MySQLs LONGTEXT #62 (via @joeferner)
313
-
314
- New Feature:
315
- - Added dry-run support for migrations #55 (via @joeferner)
316
-
317
- ## 0.3.1
318
-
319
- Improvement:
320
- - Added support for boolean data type #66 (via @trojanowski)
321
-
322
- ## 0.3.2
323
-
324
- Fix
325
- - Update error message when using an invalid data type #67 (via @swang)
326
-
327
- ## 0.4.0
328
-
329
- New Feature:
330
- - Added support for renameColumn in MySQL #80 (via @akinnunen)
331
-
332
- Improvement:
333
- - Added --version flag #73 (via @mcandre)
334
- - Lazily require migrations #77, #78 (via @btakita)
335
-
336
- Fix
337
- - Fixed typo in lib/driver/pg.js for BLOB datatype #76
338
-
339
- ## 0.4.1
340
-
341
- Improvement:
342
- - Add support for BIGINT data type #81
343
-
344
- ## 0.4.2
345
-
346
- Improvement:
347
- - Superficial changes based on JSHint report #85, #88 (via @mcandre)
348
- - Let DATABASE_URL configure any database #90 (via @pwnall)
349
-
350
- Fix:
351
- - Fix for postgres driver blindly recreating the migrations table #89 (via @sgibbons)
352
- - Mitigate `npm test` permission error #95 (via @mcandre)
353
-
354
- ## 0.5.0
355
-
356
- New Feature:
357
- - Support for database URLs in database.json #103 (via @miguelgrinberg)
358
- - Option to use native Postgres client #106 (via @olalonde)
359
-
360
- Improvement:
361
- - Updated README.md documentation #98 (via @acco)
362
-
363
- ## 0.5.1
364
-
365
- Improvement:
366
- - Add a force-exit flag #108 (via @codeaholics)
367
- - Provide close callback for MySQL driver #107 (via @codeaholics)
368
-
369
- ## 0.5.2
370
-
371
- Fix:
372
- - Add ability to create camel-cased column names for PostgreSQL #111 (via @virpool)
373
- - Add ability to make a unique index #110 (via @codeaholics)
374
-
375
- ## 0.5.3
376
-
377
- Fix:
378
- - Fixed bug setting default values to values that are falsy #114 (via @wbrady)
379
-
380
- ## 0.5.4
381
-
382
- Fix:
383
- - Add backticks to MySQL driver #114 (via @mstorgaard)
384
-
385
- ## 0.6.0
386
-
387
- New Feature:
388
- - Support varargs in runSql, all on mysql driver #119 (via @Gloridea)
389
- - Load Environment Variables specified in config file #118 (via @codyhanson)
390
- - Added CoffeeScript support for migrations #116 (via @DeniSix)
391
-
392
- Improvement:
393
- - Added date type for sqlite3 #121 (via @mrcsparker)
394
-
395
- Fix:
396
- - Fix postgres issue with camelCased column name definition #125 (via @virpool)
397
-
398
- ## 0.6.1
399
-
400
- Fix:
401
- - Fix two regressions related to runSql not accepting params as an
402
- array #127, #128
403
-
404
- ## 0.6.2
405
-
406
- Fix:
407
- - Fix add index downcasing table name in MySQL #126 (via @noazark)
408
- - Fix dry run on first migration #132 (via @jgoyon)
409
-
410
- Improvement:
411
- - Add decimal data type support
412
-
413
- ## 0.6.3
414
-
415
- Fix
416
- - Fix postgres issue with camelCased column name during insert #137 (via @tone81)
417
-
418
- ## 0.6.4
419
-
420
- Improvement:
421
- - Handle more than one single quote in string literals in a portable way #151 (via @szywon)
422
- - added date, char and smallint types for pg #150 (via @FabricioFFC)
423
- - better error handling for broken database.json files #149 (via @acruikshank)
424
-
425
- Fix:
426
- - Make compatible with coffee-script 1.7 #147 (via @jinze)
427
- - docs: the exports.down fn gets (db, callback) as params #144 (via @alxndr)
428
- - Fix for multiple single quotes in a string #143
429
-
430
- ## 0.7.0 (2014-08-01)
431
-
432
- Improvement:
433
- - Externalize db configuration for tests #180 (via @dlaxar)
434
- - Tightening up some js syntax #179 (via @paulomcnally)
435
- - Change down migrations to execute in order they were run #178 (via @ajkerr)
436
- - addForeignKey and removeForeignKey added to mysql #174 (via @JohanObrink)
437
- - Add ability to use .env file for config if present #170 (via @bvalosek)
438
-
439
- ## 0.7.1 (2014-08-05)
440
-
441
- Improvement:
442
- - allow addColumn to create primary keys #183 (via @lourenzo)
443
-
444
- ## 0.8.0 (2014-11-25)
445
-
446
- Improvement:
447
- - Allow changing schema for Postgres #153 (via @zoips)
448
- - Enable autoincrement even when emitting primary key #157 (via @kkurahar)
449
- - New option to auto-generate SQL files #160 (via @tuliomonteazul)
450
- - Allow dry run to work when there is no migration table #166 (via @jjshoe)
451
- - Add support for Postgres driver in DATABASE_URL #188 (via @saxicek)
452
- - Use JSON.stringify on non-string objects #185 (via @G3z)
453
- - Add back quotes around foreign key name #189 (via @sitnin)
454
- - Mask passwords in verbose logging #195 (via @Crotery)
455
-
456
- ## 0.9.0 (2015-02-14)
457
-
458
- Improvement:
459
- - Documentation improvements #223, #210, #199, #158, #138 (Tobias Gurtzick @wzrdtales)
460
- - Multiple Scope Support (@wzrdtales)
461
- - Fixed bug by generalizing the usage of automatic quoting over all current drivers #204, #140, #155 (@wzrdtales)
462
- - MongoDB Driver #205, 217 (Tom Calfish @toymachiner62)
463
- - Fix error db-migrate command not found, make db-migrate usable as global module #210, #138 (@wzrdtales)
464
- - Add coffeescript template #208 (@richardfickling)
465
- - Support for Postgresql foreign keys #203 (@dlaxar and @NOtherDev)
466
- - Add support to create new databases and schemas #196, #202 (@wzrdtales)
467
- - Add ability to change the migration table name #192 (@wzrdtales)
468
- - Fix bug with column unique specification #123 (@wzrdtales)
469
- - Added support for constraints on columns #35 (@wzrdtales)
470
- - Added reset functionality #221 (@wzrdtales)
471
- - Aliased "default" option to "env" #219 (@wzrdtales)
472
-
473
- Full log at:
474
- [v0.9.0](https://github.com/kunklejr/node-db-migrate/issues?q=milestone%3Av0.9.0)
@@ -1,46 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- ## Our Standards
8
-
9
- Examples of behavior that contributes to creating a positive environment include:
10
-
11
- * Using welcoming and inclusive language
12
- * Being respectful of differing viewpoints and experiences
13
- * Gracefully accepting constructive criticism
14
- * Focusing on what is best for the community
15
- * Showing empathy towards other community members
16
-
17
- Examples of unacceptable behavior by participants include:
18
-
19
- * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
- * Trolling, insulting/derogatory comments, and personal or political attacks
21
- * Public or private harassment
22
- * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
- * Other conduct which could reasonably be considered inappropriate in a professional setting
24
-
25
- ## Our Responsibilities
26
-
27
- Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
-
29
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
-
31
- ## Scope
32
-
33
- This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
-
35
- ## Enforcement
36
-
37
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at dbmigrate@wizardtales.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
-
39
- Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
-
41
- ## Attribution
42
-
43
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
-
45
- [homepage]: http://contributor-covenant.org
46
- [version]: http://contributor-covenant.org/version/1/4/
package/CONTRIBUTING.md DELETED
@@ -1,81 +0,0 @@
1
- # Contributing by opening an Issue or Discussing
2
-
3
- Whenever you find a bug, which you do not have the time to fix, it is still important
4
- to get your input. Same goes for feature suggestions and everything else that helps
5
- a project to get better.
6
-
7
- Here are a few points to consider before creating an issue or discussing within one:
8
-
9
- 1. Make sure you have proper description of your problem or what exactly you want:
10
-
11
- We have issue templates in place that should help you with this one and this is really
12
- important, since we may not just agree with you, if we don't understand your use case.
13
-
14
- 2. Be constructive and before you post think once more if this is going to waste the maintainers
15
- time, or if it is going to actually help them.
16
-
17
- Since being constructive, is a big vague, here some simple points that should help you:
18
-
19
- 2.1. Just stating something is wrong, is not constructive.
20
-
21
- When you've got the feeling something is wrong, try to understand first if it is really wrong
22
- and if it is make suggestions on how to improve, or even better open a PR and make the open source
23
- world once again even better!
24
-
25
- 2.2. "Does not work", is not a proper problem description
26
-
27
- Neither is, "see title". When you follow the issue template and provide all informations asked for
28
- you should be pretty fine, in providing us exactly the information we need to help you.
29
-
30
- 2.3. Follow the CoC and contribute, not attack
31
-
32
- An example when you're not contributing, but attacking is, should you just impose you're right
33
- and you should be followed. It is always about the dialogue, that makes the difference. After all
34
- you should be fine, by just using your common sense.
35
-
36
- # Contributing a Pull Request
37
-
38
- Without pull requests from generous people like you, this project
39
- wouldn't be what it is today. You are planning to contribute aren't you?
40
- If so, here's a quick guide to creating a great pull request for
41
- this project:
42
-
43
- 1. Fork the repo.
44
-
45
- 2. Copy the test/db.config.example.json to test/db.config.json
46
-
47
- 3. Run the tests. Pull requests without tests are much less likely to be
48
- merged, and it's great to know you're starting with a clean slate: `npm test`.
49
- Be sure to check the README for setting up your test databases first.
50
-
51
- 4. Add a test for your change. Refactoring and documentation changes
52
- require no new tests. If you are adding functionality or fixing a bug,
53
- please include a test.
54
-
55
- 5. Make the test pass.
56
-
57
- 6. Create a commit that complies with our conventions, which you can view
58
- [here](https://github.com/conventional-changelog/conventional-changelog/tree/35e60b5be6027fb2784c5103eee111f6f99b045e/packages/conventional-changelog-angular)
59
- and last but not least also comply to the [DCO](https://github.com/probot/dco#how-it-works).
60
- Which easiest work with just commiting via `git commit -s -m 'your commit message'`.
61
-
62
- 7. Push to your fork and submit a pull request.
63
-
64
- At this point you're waiting on me. In a perfect world I'd commit to
65
- responding to your request in some short period of time. Unfortunately,
66
- I'm not able to do that. You'll most likely see me work off several pull
67
- requests in batches. I may suggest some changes or improvements or alternatives
68
- at that time. Please don't consider the feedback as a lack of
69
- appreciation for your time and effort. It most certainly is not.
70
-
71
- Some things that will increase the chance that your pull request is accepted,
72
- are:
73
-
74
- * Include good tests
75
- * Keep the changeset small
76
- * Stick to existing code conventions
77
- * Update the documentation, examples elsewhere, guides,
78
- whatever is affected by your contribution
79
-
80
- See my [pull request etiquette](http://kunkle.org/blog/2013/07/10/pull-request-etiquette/)
81
- post for more contribution tips.
package/Makefile DELETED
@@ -1,8 +0,0 @@
1
- test:
2
- @node node_modules/lab/bin/lab -I verbose,dryRun,SharedArrayBuffer,Atomics,BigUint64Array,BigInt64Array,BigInt,URL,URLSearchParams,TextEncoder,TextDecoder,queueMicrotask --coverage-exclude lib/interface --coverage-exclude lib/transitions
3
- test-cov:
4
- @node node_modules/lab/bin/lab -t 66 -I verbose,dryRun,SharedArrayBuffer,Atomics,BigUint64Array,BigInt64Array,BigInt,URL,URLSearchParams,TextEncoder,TextDecoder,queueMicrotask --coverage-exclude lib/interface --coverage-exclude lib/transitions
5
- test-cov-html:
6
- @node node_modules/lab/bin/lab -r html -o coverage.html -I verbose,dryRun,SharedArrayBuffer,Atomics,BigUint64Array,BigInt64Array,BigInt,URL,URLSearchParams,TextEncoder,TextDecoder,queueMicrotask --coverage-exclude lib/interface --coverage-exclude lib/transitions
7
-
8
- .PHONY: test test-cov test-cov-html
@@ -1 +0,0 @@
1
- module.exports = { extends: ['@commitlint/config-angular'] };
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = function (internals) {
4
- require('../transitions/transitioner.js')(internals);
5
- };
@@ -1,30 +0,0 @@
1
- /**
2
- * Our first transition is actually the removal of globals and
3
- * introducing the setup routine.
4
- * Thus the body of this transition is just an empty function, but displays
5
- * as all transitions an explanation to the user.
6
- */
7
- module.exports = {
8
- transition: function () {},
9
-
10
- message: function () {
11
- console.log(
12
- 'Congratulations!\n\n' +
13
- 'You just migrated from protocol 0 to 1!\n' +
14
- 'What does that mean for you?\n' +
15
- 'Quite simple, from 0 to 1 we introduced the setup function and we ' +
16
- 'deprecated some globals, like async or dbm. What this transition does is' +
17
- ' grabbing your migrations, replacing the async and dbm definitions and ' +
18
- 'inserting the setup body if not present.\n' +
19
- 'It might be possible, that you still run into errors, for example if ' +
20
- 'you already have had a setup body, it wont be replaced and you might ' +
21
- 'be missing the default routine of the setup, which provides for example ' +
22
- 'the dataTypes to your migration.\n\n' +
23
- 'What do I need to do now?\n' +
24
- 'Try to rexecute all of your migrations and watch if you run into any ' +
25
- 'Errors, if you encounter any, you need to manually fix those ' +
26
- "problems. But don't worry, this protocol transitions happen very " +
27
- 'rarely!\n'
28
- );
29
- }
30
- };
@@ -1,22 +0,0 @@
1
- var prompt = require('prompt');
2
-
3
- function ask (schema, callback) {
4
- console.log('Starting transition helper...\n');
5
-
6
- prompt.start();
7
-
8
- prompt.get(schema, function (err, result) {
9
- if (err) {
10
- return callback(err);
11
- }
12
-
13
- if (result.safe === 'n') {
14
- console.log('Aborted transition helper!');
15
- callback(new Error('Aborted transition.'));
16
- } else {
17
- callback(null, result);
18
- }
19
- });
20
- }
21
-
22
- module.exports = ask;