First time here? Check out the FAQ!

Revision history  [back]

ValueError during Migration on MySQL

Hi there, running "./manage.py migrate" does not complete when MySQL database is used (independent of InnoDB/MyISAM) and yields the error below. Using SQLite everything is working fine.


Running migrations for django_authopenid: - Migrating forwards to 0005_auto__del_externallogindata.

django_authopenid:0001_initial django_authopenid:0002_make_multiple_openids_possible ! 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.

! You might be able to recover with: = ALTER TABLE django_authopenid_userassociation DROP COLUMN provider_name CASCADE; [] = ALTER TABLE django_authopenid_userassociation ADD CONSTRAINT django_authopenid_userassociation_user_id_uniq UNIQUE (user_id) []

! The South developers regret this has happened, and would ! like to gently persuade you to consider a slightly ! easier-to-deal-with DBMS. ! NOTE: The error which caused the migration to fail is further up. Traceback (most recent call last): File "./manage.py", line 14, in execute_manager(settings) File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 438, in execute_manager utility.execute() File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 191, in run_from_argv self.execute(args, *options.__dict__) File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 220, in execute output = self.handle(args, *options) File "/usr/lib/python2.7/dist-packages/south/management/commands/migrate.py", line 105, in handle ignore_ghosts = ignore_ghosts, File "/usr/lib/python2.7/dist-packages/south/migration/__init__.py", line 191, in migrate_app success = migrator.migrate_many(target, workplan, database) File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 221, in migrate_many result = migrator.__class__.migrate_many(migrator, target, migrations, database) File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 292, in migrate_many result = self.migrate(migration, database) File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 125, in migrate result = self.run(migration) File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 99, in run return self.run_migration(migration) File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 81, in run_migration migration_function() File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 57, in return (lambda: direction(orm)) File "/home/andi/MyAskbot/askbot/deps/django_authopenid/migrations/0002_make_multiple_openids_possible.py", line 22, in forwards db.delete_unique('django_authopenid_userassociation', ['user_id']) File "/usr/lib/python2.7/dist-packages/south/db/generic.py", line 479, in delete_unique raise ValueError("Cannot find a UNIQUE constraint on table %s, columns %r" % (table_name, columns)) ValueError: Cannot find a UNIQUE constraint on table django_authopenid_userassociation, columns ['user_id']

ValueError during Migration on MySQLMigration

Hi there, running "./manage.py migrate" does not complete when MySQL database is used (independent of InnoDB/MyISAM) and yields the error below. Using SQLite everything is working fine.


Running migrations for django_authopenid: - Migrating forwards to 0005_auto__del_externallogindata.

django_authopenid:0001_initial django_authopenid:0002_make_multiple_openids_possible ! 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.

! You might be able to recover with: = ALTER TABLE django_authopenid_userassociation DROP COLUMN provider_name CASCADE; [] = ALTER TABLE django_authopenid_userassociation ADD CONSTRAINT django_authopenid_userassociation_user_id_uniq UNIQUE (user_id) []

! The South developers regret this has happened, and would ! like to gently persuade you to consider a slightly ! easier-to-deal-with DBMS. ! NOTE: The error which caused the migration to fail is further up. Traceback (most recent call last): File "./manage.py", line 14, in execute_manager(settings) File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 438, in execute_manager utility.execute() File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 191, in run_from_argv self.execute(args, *options.__dict__) File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 220, in execute output = self.handle(args, *options) File "/usr/lib/python2.7/dist-packages/south/management/commands/migrate.py", line 105, in handle ignore_ghosts = ignore_ghosts, File "/usr/lib/python2.7/dist-packages/south/migration/__init__.py", line 191, in migrate_app success = migrator.migrate_many(target, workplan, database) File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 221, in migrate_many result = migrator.__class__.migrate_many(migrator, target, migrations, database) File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 292, in migrate_many result = self.migrate(migration, database) File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 125, in migrate result = self.run(migration) File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 99, in run return self.run_migration(migration) File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 81, in run_migration migration_function() File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 57, in return (lambda: direction(orm)) File "/home/andi/MyAskbot/askbot/deps/django_authopenid/migrations/0002_make_multiple_openids_possible.py", line 22, in forwards db.delete_unique('django_authopenid_userassociation', ['user_id']) File "/usr/lib/python2.7/dist-packages/south/db/generic.py", line 479, in delete_unique raise ValueError("Cannot find a UNIQUE constraint on table %s, columns %r" % (table_name, columns)) ValueError: Cannot find a UNIQUE constraint on table django_authopenid_userassociation, columns ['user_id']

ValueError during Migration

Hi there, running "./manage.py migrate" does not complete when MySQL database is used (independent of InnoDB/MyISAM) and yields the error below. Using SQLite everything is working fine.


Running migrations for django_authopenid: - Migrating forwards to 0005_auto__del_externallogindata.

django_authopenid:0001_initial django_authopenid:0002_make_multiple_openids_possible ! 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.

! You might be able to recover with: = ALTER TABLE django_authopenid_userassociation DROP COLUMN provider_name CASCADE; [] = ALTER TABLE django_authopenid_userassociation ADD CONSTRAINT django_authopenid_userassociation_user_id_uniq UNIQUE (user_id) []

! The South developers regret this has happened, and would ! like to gently persuade you to consider a slightly ! easier-to-deal-with DBMS. ! NOTE: The error which caused the migration to fail is further up. Traceback (most recent call last): File "./manage.py", line 14, in execute_manager(settings) File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 438, in execute_manager utility.execute() File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 191, in run_from_argv self.execute(args, *options.__dict__) File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 220, in execute output = self.handle(args, *options) File "/usr/lib/python2.7/dist-packages/south/management/commands/migrate.py", line 105, in handle ignore_ghosts = ignore_ghosts, File "/usr/lib/python2.7/dist-packages/south/migration/__init__.py", line 191, in migrate_app success = migrator.migrate_many(target, workplan, database) File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 221, in migrate_many result = migrator.__class__.migrate_many(migrator, target, migrations, database) File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 292, in migrate_many result = self.migrate(migration, database) File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 125, in migrate result = self.run(migration) File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 99, in run return self.run_migration(migration) File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 81, in run_migration migration_function() File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 57, in return (lambda: direction(orm)) File "/home/andi/MyAskbot/askbot/deps/django_authopenid/migrations/0002_make_multiple_openids_possible.py", line 22, in forwards db.delete_unique('django_authopenid_userassociation', ['user_id']) File "/usr/lib/python2.7/dist-packages/south/db/generic.py", line 479, in delete_unique raise ValueError("Cannot find a UNIQUE constraint on table %s, columns %r" % (table_name, columns)) ValueError: Cannot find a UNIQUE constraint on table django_authopenid_userassociation, columns ['user_id']