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迁移
了解Django自1.7版起内置的数据库迁移功能。掌握如何在不编写SQL的情况下创建数据库表,自动修改数据库以适应模型变化,以及如何撤销数据库更改。适合希望深化Django应用管理技能的开发者。
1048

被折叠的 条评论
为什么被折叠?



