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?

anonymous user
asked 2012-04-15 18:18:08 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment 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 ;-) ))

bgenevaux's avatar
201
bgenevaux
answered 2012-07-24 05:22:30 -0500
edit flag offensive 0 remove flag delete link

Comments

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

Evgeny's avatar Evgeny (2012-07-24 05:40:41 -0500) edit

ok thanks.

bgenevaux's avatar bgenevaux (2012-07-24 05:58:20 -0500) edit

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

randy's avatar randy (2012-09-06 02:41:47 -0500) edit
add a comment 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.

Evgeny's avatar
13.2k
Evgeny
answered 2012-04-15 18:25:52 -0500
edit flag offensive 0 remove flag delete link

Comments

I have PostgreSQL 8.3.17

elgans's avatar elgans (2012-04-16 05:19:46 -0500) edit

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 (2012-04-16 06:15:04 -0500) edit
add a comment see more comments