hidden = models.BooleanField(default=False)
然后继续
makemigrations
migrate
我的变化。之后,我决定删除它,所以我去删除了同一行
进行迁移
虽然这次我有一个错误的结尾是:
File "/opt/django/www/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/opt/django/www/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/db/backends/mysql/base.py", line 124, in execute
return self.cursor.execute(query, args)
File "build/bdist.linux-x86_64/egg/MySQLdb/cursors.py", line 205, in execute
File "build/bdist.linux-x86_64/egg/MySQLdb/connections.py", line 36, in defaulterrorhandler
django.db.utils.OperationalError: (1091, "Can't DROP 'hidden'; check that column/key exists")
我处理情况不正确吗?
编辑:我可能弄坏了什么东西。我进入我的应用程序/迁移,并在之后删除迁移文件
./manage.py migrate my_app 0010_previous_migration