Skip to content

Instantly share code, notes, and snippets.

@efagerberg
Created January 27, 2015 20:55
Show Gist options
  • Save efagerberg/b0f1392ff7a37ebbaaee to your computer and use it in GitHub Desktop.
Save efagerberg/b0f1392ff7a37ebbaaee to your computer and use it in GitHub Desktop.
Local Migration Fail
Running migrations for tutorials:
- Migrating forwards to 0009_add_sbo_users_to_flag.
> tutorials:0009_add_sbo_users_to_flag
util[DEBUG] (0.024) CREATE TABLE DDL_TRANSACTION_TEST (X INT); args=None
util[DEBUG] (0.001) CREATE TABLE DDL_TRANSACTION_TEST (X INT); args=None
util[DEBUG] (0.001) DROP TABLE DDL_TRANSACTION_TEST; args=None
util[DEBUG] (0.002) SELECT "waffle_flag"."note", "waffle_flag"."everyone", "waffle_flag"."authenticated", "waffle_flag"."name", "waffle_flag"."created", "waffle_flag"."testing", "waffle_flag"."percent", "waffle_flag"."modified", "waffle_flag"."superusers", "waffle_flag"."languages", "waffle_flag"."rollout", "waffle_flag"."id", "waffle_flag"."staff" FROM "waffle_flag" WHERE "waffle_flag"."name" = 'tutorials' ; args=('tutorials',)
util[DEBUG] (0.026) SELECT "heron_account"."slug", "heron_account"."max_users", "heron_account"."billing_info_id", "heron_account"."active_subscription", "heron_account"."salesforce_id", "heron_account"."extra", "heron_account"."flagged_for_review", "heron_account"."individual", "heron_account"."trial_id", "heron_account"."zuora_id", "heron_account"."last_modified_time", "heron_account"."email_domains", "heron_account"."cancellation_date", "heron_account"."created_time", "heron_account"."billing_type", "heron_account"."organization_id", "heron_account"."allow_self_registration", "heron_account"."id", "heron_account"."name" FROM "heron_account" WHERE "heron_account"."name" = 'Safari Books Online' ; args=('Safari Books Online',)
util[DEBUG] (0.000) SELECT "south_migrationhistory"."id", "south_migrationhistory"."app_name", "south_migrationhistory"."migration", "south_migrationhistory"."applied" FROM "south_migrationhistory" WHERE ("south_migrationhistory"."app_name" = 'tutorials' AND "south_migrationhistory"."migration" = '0009_add_sbo_users_to_flag' ); args=('tutorials', '0009_add_sbo_users_to_flag')
Error in migration: tutorials:0009_add_sbo_users_to_flag
Traceback (most recent call last):
File "./manage.py", line 21, in <module>
execute_from_command_line(sys.argv)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/Django-1.6.7-py2.7.egg/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/Django-1.6.7-py2.7.egg/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/Django-1.6.7-py2.7.egg/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/Django-1.6.7-py2.7.egg/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/south/management/commands/migrate.py", line 111, in handle
ignore_ghosts = ignore_ghosts,
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/south/migration/__init__.py", line 220, in migrate_app
success = migrator.migrate_many(target, workplan, database)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/south/migration/migrators.py", line 254, in migrate_many
result = migrator.__class__.migrate_many(migrator, target, migrations, database)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/south/migration/migrators.py", line 329, in migrate_many
result = self.migrate(migration, database)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/south/migration/migrators.py", line 133, in migrate
result = self.run(migration, database)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/south/migration/migrators.py", line 114, in run
return self.run_migration(migration, database)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/south/migration/migrators.py", line 89, in run_migration
self.record(migration, database)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/south/migration/migrators.py", line 289, in record
record = MigrationHistory.for_migration(migration, database)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/south/models.py", line 21, in for_migration
migration=migration.name(),
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/Django-1.6.7-py2.7.egg/django/db/models/manager.py", line 151, in get
return self.get_queryset().get(*args, **kwargs)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/Django-1.6.7-py2.7.egg/django/db/models/query.py", line 304, in get
num = len(clone)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/Django-1.6.7-py2.7.egg/django/db/models/query.py", line 77, in __len__
self._fetch_all()
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/Django-1.6.7-py2.7.egg/django/db/models/query.py", line 857, in _fetch_all
self._result_cache = list(self.iterator())
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/Django-1.6.7-py2.7.egg/django/db/models/query.py", line 220, in iterator
for row in compiler.results_iter():
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/Django-1.6.7-py2.7.egg/django/db/models/sql/compiler.py", line 713, in results_iter
for rows in self.execute_sql(MULTI):
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/Django-1.6.7-py2.7.egg/django/db/models/sql/compiler.py", line 786, in execute_sql
cursor.execute(sql, params)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/Django-1.6.7-py2.7.egg/django/db/backends/util.py", line 69, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/Django-1.6.7-py2.7.egg/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/Django-1.6.7-py2.7.egg/django/db/utils.py", line 99, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/Users/efagerberg/heron/ve/lib/python2.7/site-packages/Django-1.6.7-py2.7.egg/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
django.db.utils.InternalError: current transaction is aborted, commands ignored until end of transaction block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment