e-hulp/HelpIM — Issue #141: During the install, can't create table 'helpim.#sql-127f_26'
Author: GMLudo
Created: 2012-02-06 14:01:51+00:00
State: open

I've followed your setup documentation, with a git clone.
I've no error messages at each step, until "./bin/manage.py migrate".
I use Arch Linux with python 2.7.2 and MySQL 5.5.20.

This is the backtrace, it's a bug in your migration script or a problem in my setup ?

I've found this piece of information: http://mysqlperformanceandtips.blogspot.com/2009/03/mysql-error-cant-create-table-errno-121.html
But I've no idea to fix the problem.

Thanks for your help.

Regards,

PS: Thanks a lot for your presentation at FOSDEM, it was very interesting for me.

$ ./bin/manage.py migrate
Running migrations for conversations:
- Migrating forwards to 0009_auto__chg_field_participant_user__del_unique_participant_user.
> conversations:0001_initial
> conversations:0002_auto__add_field_participant_role
> conversations:0003_auto__del_messagecomment
> conversations:0004_auto__add_field_chatmessage_event
> conversations:0005_auto__del_field_chat_room
> conversations:0006_auto__add_field_participant_ip_hash__add_field_participant_blocked
> conversations:0007_auto__add_field_participant_blocked_at
> conversations:0008_auto__add_field_participant_user
> conversations:0009_auto__chg_field_participant_user__del_unique_participant_user
- Loading initial data for conversations.
No fixtures found.
Running migrations for common:
- Migrating forwards to 0004_auto__add_eventlog.
> common:0001_initial
> common:0002_auto__add_field_additionaluserinformation_chat_nick
> common:0003_auto__chg_field_additionaluserinformation_branch_office
! 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:
! 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 "./bin/manage.py", line 27, in
djangorecipe.manage.main('helpim.development')
File "/home/lg/documents/git/HelpIM/eggs/djangorecipe-0.23.1-py2.7.egg/djangorecipe/manage.py", line 16, in main
management.execute_manager(mod)
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/usr/lib/python2.7/site-packages/south/management/commands/migrate.py", line 105, in handle
ignore_ghosts = ignore_ghosts,
File "/usr/lib/python2.7/site-packages/south/migration/__init__.py", line 191, in migrate_app
success = migrator.migrate_many(target, workplan, database)
File "/usr/lib/python2.7/site-packages/south/migration/migrators.py", line 221, in migrate_many
result = migrator.__class__.migrate_many(migrator, target, migrations, database)
File "/usr/lib/python2.7/site-packages/south/migration/migrators.py", line 292, in migrate_many
result = self.migrate(migration, database)
File "/usr/lib/python2.7/site-packages/south/migration/migrators.py", line 125, in migrate
result = self.run(migration)
File "/usr/lib/python2.7/site-packages/south/migration/migrators.py", line 99, in run
return self.run_migration(migration)
File "/usr/lib/python2.7/site-packages/south/migration/migrators.py", line 81, in run_migration
migration_function()
File "/usr/lib/python2.7/site-packages/south/migration/migrators.py", line 57, in
return (lambda: direction(orm))
File "/home/lg/documents/git/HelpIM/helpim/common/migrations/0003_auto__chg_field_additionaluserinformation_branch_office.py", line 12, in forwards
db.alter_column('common_additionaluserinformation', 'branch_office_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['common.BranchOffice'], null=True))
File "/usr/lib/python2.7/site-packages/south/db/generic.py", line 397, in alter_column
field.rel.to._meta.get_field(field.rel.field_name).column
File "/usr/lib/python2.7/site-packages/south/db/generic.py", line 150, in execute
cursor.execute(sql, params)
File "/usr/lib/python2.7/site-packages/django/db/backends/util.py", line 34, in execute
return self.cursor.execute(sql, params)
File "/usr/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 86, in execute
return self.cursor.execute(query, args)
File "/usr/lib/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1005, "Can't create table 'helpim.#sql-127f_26' (errno: 121)")