When doing a migration including RenameModel() operations, collections are correctly reamed, but not their corresponding schema document, resulting in out-of-sync database information for fields and auto-incremental primary IDs
How to reproduce
Create a first migration creating a Model, with at least a primary id, and apply it:
After launching the 2 migrations, schema document is not synced with the latest Model name, so new Model instances are created without the incremental ID value
Description
When doing a migration including
RenameModel()
operations, collections are correctly reamed, but not their corresponding schema document, resulting in out-of-sync database information for fields and auto-incremental primary IDsHow to reproduce
Implications
After launching the 2 migrations, schema document is not synced with the latest Model name, so new Model instances are created without the incremental ID value