3

I'm using a Django app that has recently been updated. I put this new package info in my requirements.txt file and it installs correctly. But, I can't get my database to register it (I'm using Django 1.5.8). The new version of the app includes a new field and that column is not being added to my database. I'm using South and have done a schemamigration. I've also tried migrating and using the syncdb command but I keep getting this error:

DatabaseError at /admin/publications/publication/

column publications_publication.location does not exist
LINE 1: ...isher", "publications_publication"."institution", "publicati...
                                                         ^

Request Method:     GET
Request URL:    http://localhost:8000/admin/publications/publication/
Django Version:     1.5.11
Exception Type:     DatabaseError
Exception Value:    

column publications_publication.location does not exist
LINE 1: ...isher", "publications_publication"."institution", "publicati... 

Any idea on how to fix this? How can I add this new column?

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
steph
  • 701
  • 2
  • 10
  • 30
  • If migration did not work you can always manually add the column to the database table. – Selcuk Feb 10 '15 at 21:07
  • 2
    @Selcuk: you should never manually edit the database when you're using migrations - it becomes a huge mess over time. – Simeon Visser Feb 10 '15 at 21:08
  • @SimeonVisser any other suggestion of how to fix this? – steph Feb 10 '15 at 21:10
  • @steph: you should migrate first, there should not be a need to use `syncdb` as you don't need to create new tables here. – Simeon Visser Feb 10 '15 at 21:14
  • I've don't that (just tried again too) and unfortunately it doesn't work. I still have the issue...? – steph Feb 10 '15 at 21:18
  • To debug the problem you can run `python manage.py migrate name_of_your_app --list`. This command does nothing to your database, it only lists you all migrations that an app provides. On the left to the migrations there are brackets and probably an asterisk, like `(*) 0001_some_name`. A `*` means that Django thinks a migration has been applied, empty brackets mean that Django thinks this migration hasn't run. Could you update your question with the output of this command? – sthzg Jun 01 '15 at 19:21

0 Answers0