Database error in mirgation 0158_add_title_search_indices_for_postgresql_and_mysql

Everytime I've attempted to update Askbot on my production server I end up getting migration errors. The errors are usually related to a missing function in a plsql file.

I'm not sure what function does not exist:

Error in migration: askbot:0158_add_title_search_indices_for_postgresql_and_mysql
The following content types are stale and need to be deleted:

askbot | groupprofile

Any objects related to these content types by a foreign key will also be deleted. Are you sure you want to delete these content types? If you're unsure, answer 'no'.

Type 'yes' to continue, or 'no' to cancel: yes

Traceback (most recent call last):

 File "", line 11, in <module>
 File "/home/spirituality/webapps/askbot/lib/python2.7/django/core/management/", line 438, in execute_manager
 File "/home/spirituality/webapps/askbot/lib/python2.7/django/core/management/", line 379, in execute
 File "/home/spirituality/webapps/askbot/lib/python2.7/django/core/management/", line 191, in run_from_argv
   self.execute(*args, **options.__dict__)
 File "/home/spirituality/webapps/askbot/lib/python2.7/django/core/management/", line 220, in execute
   output = self.handle(*args, **options)
 File "/home/spirituality/lib/python2.7/south/management/commands/", line 108, in handle
   ignore_ghosts = ignore_ghosts,
 File "/home/spirituality/lib/python2.7/south/migration/", line 213, in migrate_app
   success = migrator.migrate_many(target, workplan, database)
 File "/home/spirituality/lib/python2.7/south/migration/", line 235, in migrate_many
   result = migrator.__class__.migrate_many(migrator, target, migrations, database)
 File "/home/spirituality/lib/python2.7/south/migration/", line 310, in migrate_many
   result = self.migrate(migration, database)
 File "/home/spirituality/lib/python2.7/south/migration/", line 133, in migrate
   result =
 File "/home/spirituality/lib/python2.7/south/migration/", line 107, in run
   return self.run_migration(migration)
 File "/home/spirituality/lib/python2.7/south/migration/", line 81, in run_migration
 File "/home/spirituality/lib/python2.7/south/migration/", line 57, in <lambda>
   return (lambda: direction(orm))
 File "/home/spirituality/webapps/askbot/askbot-discussion/askbot/migrations/", line 33, in forwards
 File "/home/spirituality/webapps/askbot/askbot-discussion/askbot/search/postgresql/", line 21, in setup_full_text_search
 File "/home/spirituality/webapps/askbot/lib/python2.7/django/db/backends/", line 34, in execute
   return self.cursor.execute(sql, params)
 File "/home/spirituality/webapps/askbot/lib/python2.7/django/db/backends/postgresql_psycopg2/", line 44, in execute
   return self.cursor.execute(query, args)
 django.db.utils.DatabaseError: function with OID 419076 does not exist
 CONTEXT:  PL/pgSQL function "thread_update_trigger" line 2 at assignment
 SQL statement "UPDATE askbot_thread SET text_search_vector=NULL"
 PL/pgSQL function "add_tsvector_column" line 10 at EXECUTE statement
mrB's avatar
asked 2013-01-23 13:47:26 -0500
edit flag offensive 0 remove flag close merge delete


What are the versions of your database and django? Are you using postgresql?

Evgeny's avatar Evgeny (2013-01-23 23:09:51 -0500) edit

Django 1.3.1 Postgresql 9.2

mrB's avatar mrB (2013-01-24 08:53:31 -0500) edit
add a comment see more comments