-
-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(transitioner): add transitioner to easen the process of protocol…
… changes Resolves #403
- Loading branch information
Showing
3 changed files
with
124 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
/** | ||
* Our first transition is actually the removal of globals and | ||
* introducing the setup routine. | ||
* Thus the body of this transition is just an empty function, but displays | ||
* as all transitions an explanation to the user. | ||
*/ | ||
module.exports = { | ||
|
||
transition: function() { | ||
|
||
}, | ||
|
||
message: function() { | ||
|
||
console.log('Congratulations!\n\n' + | ||
'You just migrated from protocol 0 to 1!\n' + | ||
'What does that mean for you?\n' + | ||
'Quite simple, from 0 to 1 we introduced the setup function and we' + | ||
'deprecated some globals, like async or dbm. What this transition does is' + | ||
' grabbing your migrations, replacing the async and dbm definitions and ' + | ||
'inserting the setup body if not present.\n' + | ||
'It might be possible, that you still run into errors, for example if ' + | ||
'you already have had a setup body, it wont be replaced and you might ' + | ||
'be missing the default routine of the setup, which provides for example ' + | ||
'the dataTypes to your migration.\n\n' + | ||
'What do I need to do now?\n' + | ||
'Try to rexecute all of your migrations and watch if you run into any ' + | ||
'Errors, if you encounter any, you need to manually fix those ' + | ||
'problems. But don\'t worry, this protocol transitions happen very ' + | ||
'rarely!\n' | ||
); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters