2

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

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.

gabriel_cervantes's avatar
23
gabriel_cervantes
asked 2015-05-02 19:39:15 -0600, updated 2015-05-03 11:55:39 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

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

Evgeny's avatar
13.2k
Evgeny
answered 2015-05-03 19:51:08 -0600
edit flag offensive 0 remove flag delete link

Comments

1

It works now. Thanks!

gabriel_cervantes's avatar gabriel_cervantes (2015-05-24 18:14:48 -0600) edit
add a comment see more comments