Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display a warning when migration up/down function is not an asyc function #5

Open
emmanuelbuah opened this issue Feb 7, 2018 · 0 comments
Assignees

Comments

@emmanuelbuah
Copy link
Owner

emmanuelbuah commented Feb 7, 2018

Mongo driver functionality is async in nature. To prevent Migrator from updating to the next version before the migration script is complete, using an async function for both up()/down(). This will ensure migration completes before version bump. Note: async func = async | promise.

We might have to require up()/down() to be an async function in the future. For now, warn users to avoid breaking existing code.

@emmanuelbuah emmanuelbuah self-assigned this Feb 7, 2018
emmanuelbuah added a commit that referenced this issue Feb 7, 2018
- This failed when typescript transpiled async/wait since the result was a regular function. Will reimplement this warning
when we decide to support only node v8+.
@emmanuelbuah emmanuelbuah reopened this Feb 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant