bdragon300 / mongoengine-migrate

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

Renaming the related collection of GridFS field on `collection_name` parameter change #18

Open bdragon300 opened 3 years ago

bdragon300 commented 3 years ago

GridFS fields are: FileField, ImageField.

It's needed to track collection_name of GridFS field parameter and rename the related collection if it has changed. Also keep in mind that the collection can be in different connection (db_alias). Also don't forget to check if collection with new name is already defined in Documents.

Maybe it's better to interactively ask user if do the following during executing makemigrations command.