First time here? Check out the FAQ!
0

Getting transaction errors in Postgresql migrations
 

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.

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)
Léo LEFEBVRE's avatar
1
Léo LEFEBVRE
asked 11 years ago
Evgeny's avatar
13.2k
Evgeny
updated 11 years ago

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's avatar Evgeny (11 years ago)
see more comments

2 Answers

0

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

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)
Fitoria's avatar
1.1k
Fitoria
answered 11 years ago
Evgeny's avatar
13.2k
Evgeny
updated 11 years ago
link

Comments

see more comments
0

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...

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)
Léo LEFEBVRE's avatar
1
Léo LEFEBVRE
answered 11 years ago
link

Comments

see more comments