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

Use migrations/sample-migration.js as sample content if it exists #74

Merged
merged 6 commits into from
Feb 23, 2020

Conversation

tennox
Copy link
Contributor

@tennox tennox commented Jul 20, 2019

This PR adds an easy way to provide a sample migration that will be used when the create command is executed.

It checks if the file exists, and if it does - uses that: <migrations-dir>/sample-migration.js

Checklist
  • npm test passes and has 100% coverage
  • README.md is updated

@coveralls
Copy link

coveralls commented Jul 20, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling 226911a on TeNNoX:override-sample-migration into 9866d65 on seppevs:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.6%) to 99.448% when pulling 0bffe1b on TeNNoX:override-sample-migration into 296c44d on seppevs:master.

I come to appreciate the test coverage requirements :P
@DanielRuf
Copy link
Contributor

I fail to see the advantage of this.

@tennox
Copy link
Contributor Author

tennox commented Oct 3, 2019

Well, the advantage is that you can override the default sample migration script.
I (needed to) modify it a bit, added customized examples, also refactored to async functions - I can imagine other use cases.

@seppevs
Copy link
Owner

seppevs commented Feb 23, 2020

Merged and released into migrate-mongo 7.1.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants