bdragon300 / mongoengine-migrate

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

Interactive mode for "makemigrations" command #16

Open bdragon300 opened 3 years ago

bdragon300 commented 3 years ago

When user executes makemigrations command, in some cases it could be impossible to build migrations chain because of incorrect schema state. For example if some field marked as "required" but the default value has not set.

Like in Django we could enter to interactive mode in this case and ask user to type additional info, python expression for instance. For the case when default value is missed, we can ask its value. Pay attention that default can be either a constant or callable.

I suppose that entering to interactive mode could be implemented in schema checking function (see #9).