Django-south: "! These migrations are in the database but not on disk:"

akasina9

I am trying to migrate a database, after modifying the schema in the models.py file of my app in Django. When I try to migrate using ./manage.py migrate <app-name>, it gives the following message:

! These migrations are in the database but not on disk:

As I went through the schemamigration_table and the files, I noticed that for my last schema migration, the file (which added a table and a column in another table successfully) is not present for some reason. Is there any way I could perform my migration without resetting the database?

karthikr

Yes,

If you are absolutely confident about the migration to have already applied to the database, You can safely use the --fake option.

./manage.py migrate <app-name> --fake

This would forward the migrations to the most recent migration.

--fake: Records the migration sequence as having been applied, but doesn’t actually run it. Useful for Converting An App.

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Django South替代方案?

来自分类Dev

在Django South的架构迁移

来自分类Dev

Django South的多次迁移

来自分类Dev

Django和South升级

来自分类Dev

在Django South的架构迁移

来自分类Dev

Django South和约束ID

来自分类Dev

如何在Django与South合作

来自分类Dev

Django,South和Guardian:迁移

来自分类Dev

Django South和约束ID

来自分类Dev

模型变更Django,Mezzanine,South

来自分类Dev

Django用South / Selenium测试夹具

来自分类Dev

使用South(Mysql)在Django中迁移的问题

来自分类Dev

使用South创建Django Cache表?

来自分类Dev

为什么Django South 1.0使用iteritems()?

来自分类Dev

从初始开始迁移后的Django South迁移

来自分类Dev

Django South迁移后缺少整个表

来自分类Dev

通常,何时Django模型更改需要South?

来自分类Dev

Django的Core Migrate工具与South进行Django数据迁移的对比

来自分类Dev

升级1.7.4到Django 1.8 south.db.mysql错误,不使用South

来自分类Dev

如何修改Django模块South的上一次迁移?

来自分类Dev

Django, South. Can't add new field

来自分类Dev

无法在Django 1.7中创建South数据库模型

来自分类Dev

无法在Django 1.7中创建South数据库模型

来自分类Dev

Django South:在数据迁移中更改字段类型

来自分类Dev

Django South跳过一些迁移文件

来自分类Dev

Django South错误:AttributeError:'DateTimeField'对象没有属性'model'`

来自分类Dev

管理员界面中的Django,South和IntegrityError

来自分类Dev

在Django South中删除外部应用程序迁移

来自分类Dev

Django South错误:AttributeError:'DateTimeField'对象没有属性'model'`