Database error in mirgation 0158_add_title_search_indices_for_postgresql_and_mysql

asked 2013-01-23 13:47:26 -0500

mrB gravatar image

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:

askbot:0158_add_title_search_indices_for_postgresql_and_mysql
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 "manage.py", line 11, in <module>
   execute_manager(settings)
 File "/home/spirituality/webapps/askbot/lib/python2.7/django/core/management/__init__.py", line 438, in execute_manager
   utility.execute()
 File "/home/spirituality/webapps/askbot/lib/python2.7/django/core/management/__init__.py", line 379, in execute
   self.fetch_command(subcommand).run_from_argv(self.argv)
 File "/home/spirituality/webapps/askbot/lib/python2.7/django/core/management/base.py", line 191, in run_from_argv
   self.execute(*args, **options.__dict__)
 File "/home/spirituality/webapps/askbot/lib/python2.7/django/core/management/base.py", line 220, in execute
   output = self.handle(*args, **options)
 File "/home/spirituality/lib/python2.7/south/management/commands/migrate.py", line 108, in handle
   ignore_ghosts = ignore_ghosts,
 File "/home/spirituality/lib/python2.7/south/migration/__init__.py", line 213, in migrate_app
   success = migrator.migrate_many(target, workplan, database)
 File "/home/spirituality/lib/python2.7/south/migration/migrators.py", line 235, in migrate_many
   result = migrator.__class__.migrate_many(migrator, target, migrations, database)
 File "/home/spirituality/lib/python2.7/south/migration/migrators.py", line 310, in migrate_many
   result = self.migrate(migration, database)
 File "/home/spirituality/lib/python2.7/south/migration/migrators.py", line 133, in migrate
   result = self.run(migration)
 File "/home/spirituality/lib/python2.7/south/migration/migrators.py", line 107, in run
   return self.run_migration(migration)
 File "/home/spirituality/lib/python2.7/south/migration/migrators.py", line 81, in run_migration
   migration_function()
 File "/home/spirituality/lib/python2.7/south/migration/migrators.py", line 57, in <lambda>
   return (lambda: direction(orm))
 File "/home/spirituality/webapps/askbot/askbot-discussion/askbot/migrations/0158_add_title_search_indices_for_postgresql_and_mysql.py", line 33, in forwards
postgresql.setup_full_text_search(script_path)
 File "/home/spirituality/webapps/askbot/askbot-discussion/askbot/search/postgresql/__init__.py", line 21, in setup_full_text_search
   cursor.execute(fts_init_query)
 File "/home/spirituality/webapps/askbot/lib/python2.7/django/db/backends/util.py", line 34, in execute
   return self.cursor.execute(sql, params)
 File "/home/spirituality/webapps/askbot/lib/python2.7/django/db/backends/postgresql_psycopg2/base.py", 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
edit retag flag offensive close merge delete

Comments

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

Evgeny gravatar imageEvgeny ( 2013-01-23 23:09:51 -0500 )edit

Django 1.3.1 Postgresql 9.2

mrB gravatar imagemrB ( 2013-01-24 08:53:31 -0500 )edit