Ask Your Question
0

Getting transaction errors in Postgresql migrations

asked 2013-04-18 10:56:44 -0600

Léo LEFEBVRE gravatar image

updated 2013-04-18 15:01:40 -0600

Evgeny gravatar image

I try to install askbot as a pluggable app in my django project. It seems to work but when I run

python manage.py migrate

or

python manage.py test askbot

I have the following error

...
File "/home/leo/Bureau/pic-13-geotopic/trunk/developpement/I/projetGeoForum/askbot/migrations/0161_add_field__user_languages.py", line 14, in forwards
keep_default=False)
File "/usr/lib/python2.7/dist-packages/south/db/generic.py", line 282, in add_column
self.execute(sql)
File "/usr/lib/python2.7/dist-packages/south/db/generic.py", line 150, in execute
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in execute
return self.cursor.execute(query, args)
django.db.utils.DatabaseError: column "languages" of relation "auth_user" already exists

I haven't changed any code in the askbot app. I think I have well merged the settings.py. Askbot success accessing the database.

I read this question but it doesn't really help me. Same for this. Should I use an older version of postgreSQL ?

I'm using postgreSQL 9.1.8 and psycopg2 2.4.5

Please do not hesitate if you want more information.

edit retag flag offensive close merge delete

Comments

We have a problem in adding columns in migrations when migrations are run on empty database. Do your remaining migrations run or the process simply fails? I will attempt to address this issue on our end.

Evgeny gravatar imageEvgeny ( 2013-04-18 14:31:46 -0600 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2013-04-18 10:59:01 -0600

updated 2013-04-18 15:01:31 -0600

Evgeny gravatar image

edited Please try the latest code from the repository, we might have fixed this issue.

edit flag offensive delete link more
0

answered 2013-04-19 10:00:04 -0600

Léo LEFEBVRE gravatar image

I have tested with the latest code from the repository, The initial trouble seems to be solved but I have now another error (when migrate or testing).

   > askbot:0006_add_subscription_setting_for_comments_and_mentions

   **************
Adding subscription on comment responses and name mentions for each user. 
frequency will be automatically set to the most frequent selection 
that user made for any other types of subscriptions

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)

  ...
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in execute
return self.cursor.execute(query, args)
django.db.utils.DatabaseError: column auth_user.tag_filter_setting does not exist

LINE 1: ...T "auth_user"."website", "auth_user"."last_name", "auth_user...
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-04-18 10:56:44 -0600

Seen: 473 times

Last updated: Apr 19 '13