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

Command to run single file migrations script #296

Open
shpetimselaci opened this issue Jan 12, 2021 · 7 comments
Open

Command to run single file migrations script #296

shpetimselaci opened this issue Jan 12, 2021 · 7 comments

Comments

@shpetimselaci
Copy link

Is your feature request related to a problem? Please describe.
We're using the tool to run our migrations in our MongoDB database.
Right now, it only runs all the migrations scrips under migrations folder
We want to run a migration from a single file that we recently wrote.

Describe the solution you'd like
It would be nice if we could have a command like this:

migrate-mongo [up|down] --migration-file 'migrations/your-migration-file.js'
It would use the default config you've already set, or have a argument for that as well in this line like so:

migrate-mongo [up|down] --migration-file 'migrations/your-migration-file.js' --config 'my-config-file.js'
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@shpetimselaci
Copy link
Author

Let me know if you want me to help you on this.
I'm desperate.

@ghost
Copy link

ghost commented May 6, 2021

Hello,

I implemented it here.
ftreguer#1

I forked another forked branch so it needs to be merged before mine.

Travis build currently fails for the same reason, because the Pull Request is located on the repo where it was first forked, so Travis is not well configured. When I will target main repo, it will be valid.

I ensured a 100% coverage.

@shpetimselaci
Copy link
Author

Nice!

@mastery-amit-sahani
Copy link

Anytime soon this feature would be added? 😁

@prof-alazhary
Copy link

any updates guys?

@wyardley
Copy link

wyardley commented May 7, 2022

#251 would also seem to accomplish this, more or less, right?

@stascnb
Copy link

stascnb commented Sep 12, 2022

@seppevs thumbs up

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

6 participants