django如何知道已运行了哪些迁移? [英] How does django know which migrations have been run?

查看:98
本文介绍了django如何知道已运行了哪些迁移?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

django如何知道是否已应用迁移?它通常可以正确解决问题,但如果不正确,我永远都不知道从哪里开始进行故障排除。

How does django know whether a migration has been applied yet? It usually gets it right, but when it doesn't I don't ever know where to start troubleshooting.

推荐答案

Django写道表 django_migrations 中的一条记录,其中包含一些信息,例如迁移所属于的应用程序,迁移的名称以及应用的日期。

Django writes a record into the table django_migrations consisting of some information like the app the migration belongs to, the name of the migration, and the date it was applied.

这篇关于django如何知道已运行了哪些迁移?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆