Django正在删除并重新创建模型,而不是重命名

class ModelA:
    pass

class ModelB:
    model_a = ForeignKey(ModelA)

If I want to rename ModelA to ModelANew here is the strategy Django Follows:

  1. Migration 1: Create ModelANew
  2. Migration 2:
    • Remove field model_a from ModelB.
    • Add field model_a_new to ModelB
  3. Migration 3: Delete ModelA

The obvious downside of this is that the information in the table modela is lost. Can this be done with renaming the model? Django obviously did not ask if this was a rename. Is it possible to inform or make it go that route? If not, what would be a strategy to manually code the migration.