Skip to content

Commit a0432f1

Browse files
committed
refactor(transition): remove transitioner entirely
since it is not needed anymore. BREAKING CHANGE: the transitioner will disappear from the API entirely. The need for it disappeared since it was there to help with the migration from very old migration schemas to the new ones that did not support very old globals and async the library provided by db-migrate itself. Users that for some reason need that can get it from the v0.11.x versions and then migrate to the newest version afterwards. Refers to db-migrate#627 Signed-off-by: Tobias Gurtzick <[email protected]>
1 parent 8874fa6 commit a0432f1

12 files changed

+49
-479
lines changed

api.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,6 @@ dbmigrate.prototype = {
320320
return log.silence(isSilent);
321321
},
322322

323-
/**
324-
* Transition migrations to the latest defined protocol.
325-
*/
326-
transition: function () {
327-
load('transition')(this.internals);
328-
},
329-
330323
/**
331324
* Creates a correctly formatted migration
332325
*/

lib/commands/run.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,12 @@ var yargs = require('yargs');
55

66
function run (internals, config) {
77
const { load } = internals;
8-
const transition = load('transition');
98
var action = internals.argv._.shift();
109
var folder = action.split(':');
1110

1211
action = folder[0];
1312

1413
switch (action) {
15-
case 'transition':
16-
transition(internals);
17-
break;
1814
case 'create':
1915
if (folder[1]) {
2016
internals.matching = folder[1];
@@ -114,8 +110,7 @@ function run (internals, config) {
114110
);
115111
} else {
116112
log.error(
117-
'Invalid Action: Must be [up|down|check|create|reset|sync|' +
118-
'db|transition].'
113+
'Invalid Action: Must be [up|down|check|create|reset|sync|db].'
119114
);
120115
yargs.showHelp();
121116
process.exit(1);

lib/commands/set-default-argv.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = function (internals, isModule) {
2323
internals.argv = yargs
2424
.default(defaultConfig)
2525
.usage(
26-
'Usage: db-migrate [up|down|check|reset|sync|create|db|transition] ' +
26+
'Usage: db-migrate [up|down|check|reset|sync|create|db] ' +
2727
'[[dbname/]migrationName|all] [options]'
2828
)
2929
.describe(

lib/commands/transition.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

lib/transitions/1.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

lib/transitions/ask.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

lib/transitions/snippets/setup.sjs

Lines changed: 0 additions & 8 deletions
This file was deleted.

lib/transitions/transitioner.js

Lines changed: 0 additions & 78 deletions
This file was deleted.

lib/transitions/try-require.js

Lines changed: 0 additions & 113 deletions
This file was deleted.

lib/transitions/update-version.js

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)