You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe its a stupid argument, but this requirement for me is an extra guarantee that I don't wipe my db my accident.
Downgrading to square one seems like an edge case - can you give example when that is needed?
Only case where I ever needed such thing was in tests - and there you could always hardcode the initial migration name.
If you feel it would be nice addition, I would gladly accept PR for it.
I do understand your point about data handling security.
I thought of it because in a multi-teams project where we share a database, it seemed interesting to have a way of downgrading back to the previous DB state if the other team could eventually not complete their dev and have the migration ready to work on their side.
Does it make sense?
It ultimately is your decision, though. (I'll make a PR, feel free to approve or reject it :))
(Actually, I'm sorry but it seems to fail authenticating when I want to push my branch... I cloned the repo, checked out to a new branche and tried to push after committing. Am I missing a step? Thanks!)
sobelek
added a commit
to sobelek/pymongo-migrate
that referenced
this issue
Oct 11, 2020
Hi,
first of all, thanks a lot for this nice tool, it's really great for quick Mongo migrations!
Here is a small CLI bug:
Describe the bug
The API allows for an optional
migration
param, but the CLI requires it.To Reproduce
Run
pymongo-migrate downgrade -m folder -u URI
: you get an error sayingMIGRATION
is required.Expected behavior
The
MIGRATION
param should be optional: if none is provided, we downgrade all migrations in the folder.Proposed fix
In
src/cli.py
, line 144-145, replace:with
The text was updated successfully, but these errors were encountered: