First time here? Check out the FAQ!
1

Installation error while migrate askbot
 

I install askbot (askbot-0.7.40-py2.6) according documentation.

Everything was going ok. But i have many strange output errors while command run:

python manage.py migrate askbot

like this

FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN "website" varchar(200) NOT NULL;
The error was: column "website" of relation "auth_user" already exists

And last this:

 > askbot:0032_auto__del_field_badgedata_multiple__del_field_badgedata_description__d
FATAL ERROR - The following SQL query failed: ALTER TABLE "askbot_badgedata" ADD CONSTRAINT "askbot_badgedata_56ae2a2a" UNIQUE ("slug")
The error was: relation "askbot_badgedata_56ae2a2a" already exists

Is it bug or not?

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)
anonymous user
asked 13 years ago

Comments

see more comments

2 Answers

1

I had a similar error.

In fact, I had

FATAL ERROR - The following SQL query failed: ALTER TABLE "auth_user" ADD COLUMN ...

The error was: column "..." of relation "auth_user" already exists

for each migrations which add a column to the auth_user model; and at the end of the installation, I can't create any question without an error saying that the column "is_private" doesn't exist in the table askbot_post. (Besides, I tried to install askbot with both mysql 5.0 an postgresql 9.1, and the problem was here only with postgresql.)

When I looked up a little, it seems that initially, when db is synced, the auth_user model is already correct, and all the migrations modifying it failed, in particular the 0124 which add the column "is_private" to askbot_post (and because I use the last version of psycopg2, it was rolled back), so I tried to delete all the adding and modifying of auth_user, and this worked ! But this was ugly ...

Then I looked up some more, and it seems that you patched the auth_user only in the initial migration, and not in the next ones, so I tried to use the safe_add_column method (instead of add_column) for all these adding, and once again it worked and it is much nicer :-)

I still have a fatal error on the migration 0014 that I can't explain, but I will look it in a few days.

(Ah, and just to let you know, it worked with mysql because south doesn't work well with my version of mysql (isn't it funny ;-) ))

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)
bgenevaux's avatar
201
bgenevaux
answered 12 years ago
link

Comments

This error was fixed in the repository today, tested on postgres 8.4.11.

Evgeny's avatar Evgeny (12 years ago)

ok thanks.

bgenevaux's avatar bgenevaux (12 years ago)

I'm still getting the same error with MySQL 5.0, 5.1 and 5.5 (i tried all three)

randy's avatar randy (12 years ago)
see more comments
1

It is a bug related to specific versions of databases - which database are you using?

This post suggests a possible solution (seems to work for postgresql 9).

http://askbot.org/en/question/6902/error-while-setting-up-askbot

We might not be able to really fix this for a week or two due to vacations.

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 13 years ago
link

Comments

I have PostgreSQL 8.3.17

elgans's avatar elgans (13 years ago)

Yes, I have seen this post and I tryed it. However I did it on installed database. Right now I do it again on new database instanse and all pathes is done, some with errors. But it help me and now site is up. Thanks!

elgans's avatar elgans (13 years ago)
see more comments