Ask Your Question
2

DatabaseError: column "avatar_urls" of relation "auth_user" already exists

asked 2015-05-02 19:39:15 -0500

gabriel_cervantes gravatar image

updated 2015-05-03 11:55:39 -0500

I'm trying to install the latest version of askbot from askbot-devel (0.7.53) but I got stuck on the following error.

C:\Projects\askbottest>python manage.py migrate askbot WARNING!!! You are using a 'locmem' (local memory) caching backend, which is OK for a low volume site running on a single-process server. For a multi-process configuration it is neccessary to have a production cache system, such as redis or memcached.

With local memory caching and multi-process setup you might intermittently see outdated content on your site.

Running migrations for askbot: - Migrating forwards to 0189_add_avatar_urls_jsonfield_to_auth_user.

askbot:0189_add_avatar_urls_jsonfield_to_auth_user FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "avatar_urls" text NOT NULL DEFAULT '{}'; The error was: column "avatar_urls" of relation "auth_user" already exists

Error in migration: askbot:0189_add_avatar_urls_jsonfield_to_auth_user DatabaseError: column "avatar_urls" of relation "auth_user" already exists

Any ideas?

EDIT:

I ended up replacing forward() with this:

def forwards(self, orm): #db.add_column('auth_user', 'avatar_urls', # self.gf('jsonfield.fields.JSONField')(default={}), # keep_default=False) pass

in 0189_add_avatar_urls_jsonfield_to_auth_user.py

I was able to complete the migration but this is just a quick workaround not a proper solution.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-05-03 19:51:08 -0500

Evgeny gravatar image

Pushed a fix for this to the master branch, please give it a try.

edit flag offensive delete link more

Comments

1

It works now. Thanks!

gabriel_cervantes gravatar imagegabriel_cervantes ( 2015-05-24 18:14:48 -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

Stats

Asked: 2015-05-02 19:39:15 -0500

Seen: 623 times

Last updated: May 03 '15