Ask Your Question
0

Errors when running migrations

asked 2011-09-07 06:20:44 -0500

Kristofer gravatar image

Hi, I'm trying to setup Askbot on Windows but I'm getting an error in the migration "0020_auto__add_field_repute_comment__chg_field_repute_question" when running "python manage.py migrate askbot". The error is 1005 "Can't create table 'nameofdb.#sql-8f8_7c' errno: 121".

The database engine used is MySQL 5.5 and the version of Python is 2.7. I'm new to Python and Django so maybe I'm missing something very obvious.

I tried to comment out the following line in the migration 0020

db.alter_column(u'repute', 'question_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['askbot.Question'], null=True, blank=True))

and then it passes. But when then running the migration for django_authopenid using "python manage.py migrate django_authopenid #embedded login application" I get another error (TypeError: handle() got multiple values for keyword argument 'merge' on line 220 in C:\Python27\Lib\site-packages\django-1.3-py2.7.egg\django\core\management\base.py).

Any ideas?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-09-07 08:44:08 -0500

Evgeny gravatar image

updated 2011-09-07 08:51:59 -0500

Maybe your mysql storage engine is InnoDB? Askbot is not well tested with it. Try MyISAM.

To find out - log in to mysql shell and type, for example

show create table auth_user;

Type of the storage engine will be shown at the end of the output.

If this does not help, the only way to debug this is to reproduce your installation on other system, I have never seen this error before.

edit flag offensive delete link more

Comments

Thanks! The storage engine was indeed InnoDB. After having switched to MyISAM all migrations passed without any problems.I still have the problem with the migration of django_authopenid though. Any help would be very much appreciated. Thanks

Kristofer gravatar imageKristofer ( 2011-09-08 02:54:53 -0500 )edit

What are the problems with django_authopenid?

Evgeny gravatar imageEvgeny ( 2011-09-08 06:37:48 -0500 )edit

The problem turned out to be when a migration wanted to make two fields unique in the table django_authopenid_userassociation the previously unique field could not be found. I did this manually and the site is now up and running. Thanks again for the help.

Kristofer gravatar imageKristofer ( 2011-09-08 09:11:10 -0500 )edit

Well, we want this to work right out of the box, I'll test it again on our system. Thanks for the feedback.

Evgeny gravatar imageEvgeny ( 2011-09-08 09:20:13 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-09-07 06:20:44 -0500

Seen: 375 times

Last updated: Sep 07 '11