What is the best way to migrate data in django

前端 未结 6 1332
渐次进展
渐次进展 2021-01-30 11:27

After making some changes in my models (eg. new field in a model and a new model) what is the best way of reflecting these changes to my populated database?


PS: I

6条回答
  •  时光取名叫无心
    2021-01-30 11:50

    I've asked a similar question here and got quite a few answers.

    There are quite a lot of ways of doing it, like manually doing the dumping and reloading with SQL, using fixtures or using one of the "emerging" schema-evolution packages for Django:

    • Django Evolution
    • South
    • dmigrations (there's a DjangoCon video of a panel on schema-evolution in Django where these 3 solutions are discussed)

提交回复
热议问题