bdragon300 / mongoengine-migrate

Migrations for MongoEngine inspired by Django
Apache License 2.0
17 stars 5 forks source link

mongoengine_migrate migrate error `migrate() got an unexpected keyword argument 'dummy_actions'` #1

Closed dameyerdave closed 4 years ago

dameyerdave commented 4 years ago

Goodos

I love this package! But unfortunately migrate is not working for me 😢

Steps to reproduce

  1. I created migrations using
    PYTHONPATH=. mongoengine_migrate --uri=mongodb://localhost:27017/db makemigrations -m modules.lookup
  2. I changed the model in my python files
  3. I again execute the same makemigrations command - this woks as it should 👍
  4. I try to migrate the changes but get the following error 👎
    PYTHONPATH=. mongoengine_migrate --uri=mongodb://localhost:27017/db migrate
    [INFO] MongoDB version: 4.2.3
    Traceback (most recent call last):
    File "/Users/davmeyer/.local/share/virtualenvs/icarus_be-w4UmfLn6/bin/mongoengine_migrate", line 8, in <module>
    sys.exit(cli())
    File "/Users/davmeyer/.local/share/virtualenvs/icarus_be-w4UmfLn6/lib/python3.8/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
    File "/Users/davmeyer/.local/share/virtualenvs/icarus_be-w4UmfLn6/lib/python3.8/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
    File "/Users/davmeyer/.local/share/virtualenvs/icarus_be-w4UmfLn6/lib/python3.8/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/Users/davmeyer/.local/share/virtualenvs/icarus_be-w4UmfLn6/lib/python3.8/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File "/Users/davmeyer/.local/share/virtualenvs/icarus_be-w4UmfLn6/lib/python3.8/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
    TypeError: migrate() got an unexpected keyword argument 'dummy_actions'

Expected behaviour

The migrate command should apply the changes to my mongo database.

Comments

Could you please investigate on that and correct this error or tell me what I'm doing wrong. - Thanks 🙏

dameyerdave commented 4 years ago

I fixed it by my merge request #2

bdragon300 commented 4 years ago

Hello @dameyerdave . Thanks a lot for bug report. Seems that I forgot about cli parameter during refactoring.