First time here? Check out the FAQ!
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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
gabriel_cervantes's avatar
23
gabriel_cervantes
asked 10 years ago, updated 10 years ago

Comments

see more comments

1 Answer

1

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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 10 years ago
link

Comments

1

It works now. Thanks!

gabriel_cervantes's avatar gabriel_cervantes (9 years ago)
see more comments