Ask Your Question

Errors in running migrations

asked 2011-10-17 01:51:44 -0600

josseph gravatar image

updated 2011-10-17 07:19:34 -0600

Evgeny gravatar image

Hello, I am trying to install/running askbot in my local machine(apache + mysql + windows7). In the procedure of migrations, I met the following errors. How to fix this. Thanks in advance.

 > askbot:0020_auto__add_field_repute_comment__chg_field_repute_question
 ! 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 `repute` DROP COLUMN `com
ment` CASCADE; []

 ! 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 "", line 11, in <module>
  File "C:\Python27\lib\site-packages\django-1.3.1-py2.7.egg\django\core\managem
ent\", line 438, in execute_manager
  File "C:\Python27\lib\site-packages\django-1.3.1-py2.7.egg\django\core\managem
ent\", line 379, in execute
  File "C:\Python27\lib\site-packages\django-1.3.1-py2.7.egg\django\core\managem
ent\", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "C:\Python27\lib\site-packages\django-1.3.1-py2.7.egg\django\core\managem
ent\", line 220, in execute
    output = self.handle(*args, **options)
  File "C:\Python27\lib\site-packages\south-0.7.3-py2.7.egg\south\management\com
mands\", line 105, in handle
    ignore_ghosts = ignore_ghosts,
  File "C:\Python27\lib\site-packages\south-0.7.3-py2.7.egg\south\migration\__in", line 191, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File "C:\Python27\lib\site-packages\south-0.7.3-py2.7.egg\south\migration\migr", line 221, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations, datab
  File "C:\Python27\lib\site-packages\south-0.7.3-py2.7.egg\south\migration\migr", line 292, in migrate_many
    result = self.migrate(migration, database)
  File "C:\Python27\lib\site-packages\south-0.7.3-py2.7.egg\south\migration\migr", line 125, in migrate
    result =
  File "C:\Python27\lib\site-packages\south-0.7.3-py2.7.egg\south\migration\migr", line 99, in run
    return self.run_migration(migration)
  File "C:\Python27\lib\site-packages\south-0.7.3-py2.7.egg\south\migration\migr", line 81, in run_migration
  File "C:\Python27\lib\site-packages\south-0.7.3-py2.7.egg\south\migration\migr", line 57, in <lambda>
    return (lambda: direction(orm))
  File "C:\Python27\lib\site-packages\askbot-0.7.26-py2.7.egg\askbot\migrations\", line 15, in
    db.alter_column(u'repute', 'question_id','django.db.models.fields.r
elated.ForeignKey')(to=orm['askbot.Question'], null=True, blank=True))
  File "C:\Python27\lib\site-packages\south-0.7.3-py2.7.egg\south\db\"
, line 397, in alter_column
  File "C:\Python27\lib\site-packages\south-0.7.3-py2.7.egg\south\db\"
, line 150, in execute ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-10-17 08:14:26 -0600

Evgeny gravatar image

updated 2011-10-17 08:16:02 -0600

I suspect that your storage engine is InnoDB - could you check pls?

To check this - log in to the database and type:

show create table question;

In the end of the output it will tell which storage engine is used.

At the moment Askbot does not support InnoDB, but I put this on todo list -

It will be best if you switch to PostgresQL or if you want to use MySQL - configure it for MyISAM engine.

Another thought - if you are just trying askbot then try sqlite3 database, it works just fine for the purpose and there is nothing extra to install and configure.

edit flag offensive delete link more


yes, the storage engine is Innodb. I feel It is automatically generated by askbot scripts. I will try to manually modify it to myisam. thanks.

josseph gravatar imagejosseph ( 2011-10-17 21:21:45 -0600 )edit

When I tried to convert table storage type. I met this problem: #1217 - Cannot delete or update a parent row: a foreign key constraint fails

josseph gravatar imagejosseph ( 2011-10-17 21:29:11 -0600 )edit

You probably did not go too far, so you can just rebuild the database in MyISAM - there is a way to set default storage engine in your my.cnf file. Try default-storage-engine=MYISAM.

Evgeny gravatar imageEvgeny ( 2011-10-17 21:44:27 -0600 )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


Asked: 2011-10-17 01:51:44 -0600

Seen: 276 times

Last updated: Oct 17 '11