有人可以帮我解决这个问题: 我最近安装了南来使用它来更新生产服务器上基于django的项目中的更改(Appache 2.0,MySql 5.0,python 2.5,Mysqldb for python, Django 1.3和南0.7.3)。 将我的签名命名到南的应用程序,这是成功完成,命令manage migrate signature
它输出以下后:south&mysql问题
C:\python projects\suivireal>manage.py migrate signature
Running migrations for signature:
- Migrating forwards to 0002_auto__del_field_agent_titre_en__add_field_agent_ni
veau__add_field_agen.
> signature:0002_auto__del_field_agent_titre_en__add_field_agent_niveau__add_fi
eld_agen
Traceback (most recent call last):
File "C:\python projects\suivireal\manage.py", line 14, in <module>
execute_manager(settings)
File "C:\Python26\Lib\site-packages\django\core\management\__init__.py", line
438, in execute_manager
utility.execute()
File "C:\Python26\Lib\site-packages\django\core\management\__init__.py", line
379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python26\Lib\site-packages\django\core\management\base.py", line 191,
in run_from_argv
self.execute(*args, **options.__dict__)
File "C:\Python26\Lib\site-packages\django\core\management\base.py", line 220,
in execute
output = self.handle(*args, **options)
File "c:\python26\lib\site-packages\South-0.7-py2.6.egg\south\management\comma
nds\migrate.py", line 102, in handle
delete_ghosts = delete_ghosts,
File "c:\python26\lib\site-packages\South-0.7-py2.6.egg\south\migration\__init
__.py", line 202, in migrate_app
success = migrator.migrate_many(target, workplan, database)
File "c:\python26\lib\site-packages\South-0.7-py2.6.egg\south\migration\migrat
ors.py", line 215, in migrate_many
result = migrator.__class__.migrate_many(migrator, target, migrations, datab
ase)
File "c:\python26\lib\site-packages\South-0.7-py2.6.egg\south\migration\migrat
ors.py", line 284, in migrate_many
result = self.migrate(migration, database)
File "c:\python26\lib\site-packages\South-0.7-py2.6.egg\south\migration\migrat
ors.py", line 121, in migrate
result = self.run(migration)
File "c:\python26\lib\site-packages\South-0.7-py2.6.egg\south\migration\migrat
ors.py", line 94, in run
dry_run.run_migration(migration)
File "c:\python26\lib\site-packages\South-0.7-py2.6.egg\south\migration\migrat
ors.py", line 172, in run_migration
self._run_migration(migration)
File "c:\python26\lib\site-packages\South-0.7-py2.6.egg\south\migration\migrat
ors.py", line 162, in _run_migration
raise exceptions.FailedDryRun(migration, sys.exc_info())
south.exceptions.FailedDryRun: ! Error found during dry run of '0002_auto__del_
field_agent_titre_en__add_field_agent_niveau__add_field_agen'! Aborting.
Traceback (most recent call last):
File "c:\python26\lib\site-packages\South-0.7-py2.6.egg\south\migration\migrat
ors.py", line 159, in _run_migration
migration_function()
File "c:\python26\lib\site-packages\South-0.7-py2.6.egg\south\migration\migrat
ors.py", line 56, in <lambda>
return (lambda: direction(orm))
File "C:\python projects\suivireal\..\suivireal\signature\migrations\0002_auto
__del_field_agent_titre_en__add_field_agent_niveau__add_field_agen.py", line 12,
in forwards
db.delete_column('signature_agent', 'titre_en')
File "c:\python26\lib\site-packages\South-0.7-py2.6.egg\south\db\mysql.py", li
ne 90, in delete_column
result = cursor.execute(get_fkeyname_query % (db_name, table_name, name))
File "C:\Python26\Lib\site-packages\django\db\backends\util.py", line 34, in e
xecute
return self.cursor.execute(sql, params)
File "C:\Python26\Lib\site-packages\django\db\backends\mysql\base.py", line 86
, in execute
return self.cursor.execute(query, args)
File "C:\Python26\Lib\site-packages\MySQLdb\cursors.py", line 176, in execute
if not self._defer_warnings: self._warning_check()
File "C:\Python26\Lib\site-packages\MySQLdb\cursors.py", line 92, in _warning_
check warn(w[-1], self.Warning, 3)
Warning: Table 'chold.signupsetup' doesn't exist
我用Google搜索,看它是否与MySQL有关的问题,但我不能找到一个出去的路。
请解释你在输入“迁移签名”之前做了什么。 – nicolas
以“convert_to_south”开头,然后我在模型中进行了一些更改,添加了一个字段并更改了字段名称。之后,当我执行schemamigrate选项时,它让我填写这些字段的默认值字段,我做了,它工作正常。在那之后,我根据它的重新命令执行迁移,它对上面解释的错误进行排序。 – Hakim