📜  django 中迁移文件夹的目的 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:26.698000             🧑  作者: Mango

代码示例1
migrations in django 

Migration is a way of applying changes that we have made to a model, into the database schema. 
Django creates a migration file inside the migration folder for each model to create the table schema, 
and each table is mapped to the model of which migration is created.

makemigrations : It is used to create a migration file that contains code for the tabled schema of a model.
migrate : It creates table according to the schema defined in the migration file.
Migration files are the history of your database.