I had used this command after the engine was had updated (from the 611 to the 1012). I have caught an error:

DatabaseError at /questions/a_question/question_number/question_name  
column forum_subscriptionsettings.questions_asked does not exist   
LINE 1: ...bscriptionsettings"."all_questions_watched_tags", "forum_sub...

I have fixed this, I've deleted a file

0047_auto__del_field_subscriptionsettings_questions_asked__del_field_subscr.py

From a folder

forum/migrations/

Is it normal or a bug?

asked 12 May '11, 10:31

expert's gravatar image

expert
1613816
accept rate: 0%

edited 12 May '11, 11:38

rickross's gravatar image

rickross ♦♦
12.5k2914972

Hmm... Even if you delete that file from the migrations folder it changes nothing. Except for the fact that the migration will never be executed. I think this issue is connected with the previous ones you've posted, as I remember you had again migration problems.

(12 May '11, 10:34) Jordan ♦♦

This migration, as i understood, deletes a field in a table. If I delete once the forum works, if don't do it the forum breaks when I turn a comment into an answer.

(12 May '11, 10:50) expert
2

@expert, you need to do the normal, standard migrations EVERY TIME you update. It is simple to do, just type "python manage.py migrate forum" in your OSQA directory. If you don't follow the standard steps, then you cannot hope for community support.

(12 May '11, 11:35) rickross ♦♦

But if I don't delete this file, the forum breaks. How can I fix this differently?

(12 May '11, 11:44) expert

The fact that this error raises when you try to execute the migration means that the migration has already been triggered and the required field has already been removed. In other words, the migration did the job it was created for. But for some reason it was removed from the south_migrationhistory table. This way you tell South to trigger the migration again. Your solution to the problem is to remove the 0047_auto__del_field_subscriptionsettings_questions_asked__del_field_subscr.py file. The better solution is to create a new record in the migration history table that contains '0047_auto__del_field_subscriptionsettings_questions_asked__del_field_subscr'. And from now on do not forget about migrations. Trigger them after every code update and you won't have problems with them.

link

answered 12 May '11, 11:59

Jordan's gravatar image

Jordan ♦♦
3.1k618
accept rate: 38%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×37

Asked: 12 May '11, 10:31

Seen: 476 times

Last updated: 12 May '11, 11:59

powered by OSQA