django迁移
Since version 1.7, Django has come with built-in support for database migrations. In Django, database migrations usually go hand in hand with models: whenever you code up a new model, you also generate a migration to create the necessary table in the database. However, migrations can do much more.
从1.7版开始,Django内置了对数据库迁移的支持。 在Django中,数据库迁移通常与模型并驾齐驱:每当编写新模型时,您都会生成一个迁移以在数据库中创建必要的表。 但是,迁移可以做的更多。
With this course you’ll get comfortable with Django migrations and learn how to create database tables without writing any SQL, how to automatically modify your database after you changed your models, and how to revert changes made to your database.
通过本课程,您将熟悉Django迁移,并学习如何在不编写任何SQL的情况下创建数据库表,如何在更改模型后自动修改数据库,以及如何恢复对数据库所做的更改。
翻译自: https://www.pybloggers.com/2019/03/django-migrations-101/
django迁移