BeanieODM / beanie

Asynchronous Python ODM for MongoDB
http://beanie-odm.dev/
Apache License 2.0
2.02k stars 213 forks source link

Migration issue #25

Closed rudysarquis closed 3 years ago

rudysarquis commented 3 years ago

Hello Roman, i have some issue about run migrations, where do i run this "beanie new-migration -n migration_name -p relative/path/to/migrations/directory/" to perform a migration?

roman-right commented 3 years ago

Hello Rudyard, It is better to run this from the root of your project directory. Like if your project structure is something like:

project_root:
    migrations
    app
    tests
    run.sh

then it is better to tun beanie new-migration -n initial -p migrations/ from the project_root dir

roman-right commented 3 years ago

I hope, this helped. I'm closing the issue. @rudysarquis if you have any questions regarding this, feel free to ask.

rudysarquis commented 3 years ago

Thank you for your response!

On Tue, May 11, 2021, 4:14 PM Roman @.***> wrote:

Closed #25 https://github.com/roman-right/beanie/issues/25.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/roman-right/beanie/issues/25#event-4730618621, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFYTJLR4XGY6ATJZNVC4MLTNF6YPANCNFSM44DJV35A .

guesswh0 commented 1 year ago

beanie new-migration -n initial -p migrations/ from the project_root creates file with 2 empty Classes. How do beanie catch which field is changed?