First time here? Check out the FAQ!

Revision history  [back]

South Migration: 'cannot change name of input parameter "thread_id"'?

Hi,

I tried rebuilding my db running ./manage.py syncdb and then ./manage.py migrate but I get this error output:

(askbot.org)paulo@merlin:~/workspace/askbot-deploy$ ./manage.py migrate askbot
relation "askbot_badgedata" does not exist
LINE 1: ..."."slug", "askbot_badgedata"."awarded_count" FROM "askbot_ba...
                                                             ^

Running migrations for askbot:
 - Migrating forwards to 0125_add_show_tags_field_to_user.
 > askbot:0022_init_postgresql_full_text_search
 - Migration 'askbot:0022_init_postgresql_full_text_search' is marked for no-dry-run.
 ! Error found during real run of migration! Aborting.

 ! Since you have a database that does not support running
 ! schema-altering statements in transactions, we have had 
 ! to leave it in an interim state between migrations.

! You *might* be able to recover with:   (migration cannot be dry-run; cannot discover commands)
 ! The South developers regret this has happened, and would
 ! like to gently persuade you to consider a slightly
 ! easier-to-deal-with DBMS (one that supports DDL transactions)
 ! NOTE: The error which caused the migration to fail is further up.
Error in migration: askbot:0022_init_postgresql_full_text_search
Traceback (most recent call last):
  File "./manage.py", line 11, in <module>
    execute_manager(settings)
  File "/home/paulo/.virtualenvs/askbot.org/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/home/paulo/.virtualenvs/askbot.org/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/paulo/.virtualenvs/askbot.org/local/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/paulo/.virtualenvs/askbot.org/local/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/home/paulo/.virtualenvs/askbot.org/local/lib/python2.7/site-packages/south/management/commands/migrate.py", line 107, in handle
    ignore_ghosts = ignore_ghosts,
  File "/home/paulo/.virtualenvs/askbot.org/local/lib/python2.7/site-packages/south/migration/__init__.py", line 219, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File "/home/paulo/.virtualenvs/askbot.org/local/lib/python2.7/site-packages/south/migration/migrators.py", line 235, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations, database)
  File "/home/paulo/.virtualenvs/askbot.org/local/lib/python2.7/site-packages/south/migration/migrators.py", line 310, in migrate_many
    result = self.migrate(migration, database)
  File "/home/paulo/.virtualenvs/askbot.org/local/lib/python2.7/site-packages/south/migration/migrators.py", line 133, in migrate
    result = self.run(migration)
  File "/home/paulo/.virtualenvs/askbot.org/local/lib/python2.7/site-packages/south/migration/migrators.py", line 107, in run
    return self.run_migration(migration)
  File "/home/paulo/.virtualenvs/askbot.org/local/lib/python2.7/site-packages/south/migration/migrators.py", line 81, in run_migration
    migration_function()
  File "/home/paulo/.virtualenvs/askbot.org/local/lib/python2.7/site-packages/south/migration/migrators.py", line 57, in <lambda>
    return (lambda: direction(orm))
  File "/home/paulo/workspace/askbot-devel/askbot/migrations/0022_init_postgresql_full_text_search.py", line 23, in forwards
    setup_full_text_search(script_path)
  File "/home/paulo/workspace/askbot-devel/askbot/search/postgresql/__init__.py", line 19, in setup_full_text_search
    cursor.execute(fts_init_query)
  File "/home/paulo/.virtualenvs/askbot.org/local/lib/python2.7/site-packages/django/db/backends/util.py", line 34, in execute
    return self.cursor.execute(sql, params)
  File "/home/paulo/.virtualenvs/askbot.org/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
    return self.cursor.execute(query, args)
django.db.utils.DatabaseError: cannot change name of input parameter "thread_id"
HINT:  Use DROP FUNCTION first.

My database was empty (no tables) before I began the migration so why didn't the migration go smoothly? How can I fix it?