Django: South did not pick up a manytomanyfield -


i'm in middle of process of delivering changes dev prod.

everything works on dev.

i'm using django 1.4

the problem i'm facing south did not pick , did not create table manytomanyfield i'm using.

on dev see there 21 mysql tables , 1 tables missing on prod.

i don't know how solve this.

this first time south added dev , prod.

any ideas how create missing table?

this did , error received:

./manage.py schemamigration companies --auto --update  + added m2m table companyjobs on companies.company migration updated, 0003_auto, applied, rolling now... previous_migration: 0002_auto (applied: 2013-05-04 06:19:38+00:00) running migrations companies:  - migrating backwards after 0002_auto.  < companies:0003_auto fatal error - following sql query failed: drop table `companies_company_companyjobs` cascade; error was: (1051, "unknown table 'companies_company_companyjobs'")  ! error found during real run of migration! aborting.   ! since have database not support running  ! schema-altering statements in transactions, have had   ! leave in interim state between migrations.   ! south developers regret has happened, ,  ! gently persuade consider  ! easier-to-deal-with dbms (one supports ddl transactions)  ! note: error caused migration fail 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'") 


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -