Ask Your Question
1 migrate fatal error

asked 2013-02-01 07:59:31 -0600

coldsystem gravatar image

os : centos 6.3 Database mysql

askbot:0161_add_field__user_languages FATAL ERROR - The following SQL query failed: ALTER TABLE auth_user ADD COLUMN languages varchar(128) NOT NULL DEFAULT 'en'; The error was: (1060, "Duplicate column name 'languages'") ! Error found during real run of migration! Aborting.

edit retag flag offensive close merge delete


I found many errors when migrating on Heroku. Unfortunately I was not able to solve them (yet). But the website runs OK even with these...

oscarfh gravatar imageoscarfh ( 2013-02-01 09:10:46 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2013-02-01 11:00:18 -0600


This is common if you do syncdb first and then the migrations, askbot uses add_to_class to add more fields to the auth_user table when syncdb runs the first time it will add them and then the migration will try to add them again to solve it you can do the following command:

python migrate askbot 0160
python migrate askbot 0161 --fake

The first command will migrate it up to the last migration and the last one to "fake" the new migration, this "fake" parameter will add the migration into the south history but does not applies actual changes into the database, therefore you won't see any error message.

edit flag offensive delete link more


That is interesting. So everything should be working as expected even with the errors? And I should run the "fake" to avoid the error messages, correct?

oscarfh gravatar imageoscarfh ( 2013-02-01 13:13:23 -0600 )edit

you should run --fake because if the next askbot update comes and has migrations you won't be able to pass to the 0162 without faking 0161

Fitoria gravatar imageFitoria ( 2013-02-01 13:37:37 -0600 )edit

answered 2013-02-01 16:57:31 -0600

coldsystem gravatar image

Now . downloaded askbot 0.7.48

copied database sqlite backup from 0.7.43

i ran :

python syncdb

python migrate askbot 0160

python runserver host:port

Now i have this on the browser page :

DatabaseError at /
    database disk image is malformed
    Request Method: GET
    Request URL:
    Django Version: 1.4.3
    Exception Type: DatabaseError
    Exception Value:    
    database disk image is malformed
    Exception Location: /usr/lib/python2.6/site-packages/Django-1.4.3-py2.6.egg/django/db/backends/sqlite3/ in execute, line 344
    Python Executable:  /usr/bin/python
    Python Version: 2.6.6
    Python Path:    
edit flag offensive delete link more


file corruption on sqlite3? try to access it with the sqlite3 command and check this out:

Fitoria gravatar imageFitoria ( 2013-02-01 20:43:40 -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: 2013-02-01 07:59:31 -0600

Seen: 735 times

Last updated: Feb 01 '13