Django:南方并没有找到一个很多很多的油田 我正处于从DEV到PROD.< /P>传递我的更改的过程中。

Django:南方并没有找到一个很多很多的油田 我正处于从DEV到PROD.< /P>传递我的更改的过程中。,django,django-south,Django,Django South,一切都在dev上运行良好 我正在使用Django 1.4 我面临的问题是,South并没有为我使用的许多字段创建一个表 在dev上,我看到有21个MySql表,prod上缺少1个表 我真的不知道怎么解决这个问题 这是South第一次被添加到我的开发和prod中 有没有办法创建缺少的表 这就是我所做的和我收到的错误: ./manage.py schemamigration companies --auto --update + Added M2M table for companyjobs on

一切都在dev上运行良好

我正在使用Django 1.4

我面临的问题是,South并没有为我使用的许多字段创建一个表

在dev上,我看到有21个MySql表,prod上缺少1个表

我真的不知道怎么解决这个问题

这是South第一次被添加到我的开发和prod中

有没有办法创建缺少的表

这就是我所做的和我收到的错误:

./manage.py schemamigration companies --auto --update
 + Added M2M table for companyjobs on companies.Company
Migration to be updated, 0003_auto, is already applied, rolling it back now...
previous_migration: 0002_auto (applied: 2013-05-04 06:19:38+00:00)
Running migrations for companies:
 - Migrating backwards to just after 0002_auto.
 < companies:0003_auto
FATAL ERROR - The following SQL query failed: DROP TABLE `companies_company_companyjobs` CASCADE;
The error was: (1051, "Unknown table 'companies_company_companyjobs'")
 ! Error found during real run of migration! Aborting.

 ! Since you have a database that does not support running
 ! schema-altering statements in transactions, we have had 
 ! to leave it in an interim state between migrations.

 ! The South developers regret this has happened, and would
 ! like to gently persuade you to consider a slightly
 ! easier-to-deal-with DBMS (one that supports DDL transactions)
 ! NOTE: The error which caused the migration to fail is further up.
Error in migration: companies:0003_auto
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/South-0.7.6-py2.7.egg/south/management/commands/schemamigration.py", line 173, in handle
    migrate_app(migrations, 'current-1', verbosity=verbosity)
  File "/usr/local/lib/python2.7/dist-packages/South-0.7.6-py2.7.egg/south/migration/__init__.py", line 213, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File "/usr/local/lib/python2.7/dist-packages/South-0.7.6-py2.7.egg/south/migration/migrators.py", line 356, in migrate_many
    self.migrate(migration, database)
  File "/usr/local/lib/python2.7/dist-packages/South-0.7.6-py2.7.egg/south/migration/migrators.py", line 133, in migrate
    result = self.run(migration)
  File "/usr/local/lib/python2.7/dist-packages/South-0.7.6-py2.7.egg/south/migration/migrators.py", line 107, in run
    return self.run_migration(migration)
  File "/usr/local/lib/python2.7/dist-packages/South-0.7.6-py2.7.egg/south/migration/migrators.py", line 81, in run_migration
    migration_function()
  File "/usr/local/lib/python2.7/dist-packages/South-0.7.6-py2.7.egg/south/migration/migrators.py", line 57, in <lambda>
    return (lambda: direction(orm))
  File "/srv/app/companies/migrations/0003_auto.py", line 22, in backwards
    db.delete_table('companies_company_companyjobs')
  File "/usr/local/lib/python2.7/dist-packages/South-0.7.6-py2.7.egg/south/db/mysql.py", line 78, in _cache_clear
    return func(self, table, *args, **opts)
  File "/usr/local/lib/python2.7/dist-packages/South-0.7.6-py2.7.egg/south/db/mysql.py", line 226, in delete_table
    super(DatabaseOperations, self).delete_table(table_name)
  File "/usr/local/lib/python2.7/dist-packages/South-0.7.6-py2.7.egg/south/db/generic.py", line 44, in _cache_clear
    return func(self, table, *args, **opts)
  File "/usr/local/lib/python2.7/dist-packages/South-0.7.6-py2.7.egg/south/db/generic.py", line 377, in delete_table
    self.execute('DROP TABLE %s CASCADE;' % params)
  File "/usr/local/lib/python2.7/dist-packages/South-0.7.6-py2.7.egg/south/db/generic.py", line 273, in execute
    cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", line 114, in execute
    return self.cursor.execute(query, args)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
django.db.utils.DatabaseError: (1051, "Unknown table 'companies_company_companyjobs'")
/manage.py模式迁移公司--自动--更新
+在companys.Company上为companyjobs添加了M2M表
要更新的迁移,0003_auto,已应用,正在回滚。。。
上一次迁移:0002自动(应用时间:2013-05-04 06:19:38+00:00)
为公司运行迁移:
-向后迁移到0002_自动之后。
能否显示迁移文件的顶部?(不包括文件末尾的数据库方案)。请检查:我已经尝试过了--fake,但未创建表。我想回滚南迁并重新开始这一过程。我怎样才能做到呢?你的迁移文件搞砸了吗?一些黑客可能有助于创造表格公司的就业机会;