How to correctly sync database with Askbot app?
 

Hi,

I followed the tutorial on installing Askbot:

http://askbot.org/doc/initialize-database-tables.html

When I run "python manage.py syncdb", I get the following message in my terminal:

Not synced (use migrations): - askbot.deps.django_authopenid - askbot

I then ran the two following commands:

  • python manage.py migrate askbot
  • python manage.py migrate django_authopenid

But my tables are not up to date. If I try to login in my local Askbot web application, I get an error message saying "Unknown column 'askbot_anonymousanswer.question_id".

Looking at this table in MySQL, the field is named "question_post_id". My feeling is that Askbot hasn't created the right database schema.

But I don't know any alternative. Does somebody know what I did wrong? How do I know the database version is sync with the application? I couldn't find a table with the database version.

Thanks for your help

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)
Louis-Philippe's avatar
1
Louis-Philippe
asked 12 years ago

Comments

Please give details about your database and version. Also you could try:

python manage.py syncdb --all --noinput
python manage.py migrate --fake

And then, if you are on postgresql:

python manage.py init_postgresql_full_text_search
Evgeny's avatar Evgeny (12 years ago)

Which version of MySQL are you on? My postgres comments won't help you.

Evgeny's avatar Evgeny (12 years ago)

Thanks Evgeny for the fast answer. Unfortunately, it did not work. I'm using the community edition of MySQL. It's version is 5.5.25a. Sorry for the multiple comments. Each time I press the Enter key, it posts the comment to Askbot.

Louis-Philippe's avatar Louis-Philippe (12 years ago)

In which migration do you get error? Please post traceback into your question. Also I can recommend switching to MyISAM storage engine. In the case you are using InnoDB, askbot will not work, because search relies on the MyISAM feature. Yes, enter key auto-posts the comment, try "shift enter" to add empty lines.

Evgeny's avatar Evgeny (12 years ago)

The database client version is libmysql - mysqlnd 5.0.8-dev - 20102224 - Revision:321634

Louis-Philippe's avatar Louis-Philippe (12 years ago)
see more comments