First time here? Check out the FAQ!
0

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 ...
(more)
powlo's avatar
260
powlo
asked 2012-06-25 12:05:27 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

Hi.

What db engine and askbot version are you using?

A quick fix:

python manage.py syncdb --all
python manage.py migrate --fake

This won't run south migrations and django will to the all the work to create the database, if you are using postgresql as db engine you will need to do the following commands:

python manage.py init_postgresql_full_text_search
Fitoria's avatar
1.1k
Fitoria
answered 2012-06-25 12:24:27 -0500, updated 2012-06-25 12:24:47 -0500
edit flag offensive 0 remove flag delete link

Comments

Thanks for that Fitoria it fixed the problem. Is the init_postgresql documented anywhere? I couldn't see it in the online docs. Perhaps a check for postgresql, and a reminder to call the init function, should be part of the askbot automation script? The version of askbot I'm using is that latest git master. And I'm using postgresql v9.1.4.

powlo's avatar powlo (2012-06-26 09:15:44 -0500) edit

It could be because we did not test in postgres v9 yet.

Evgeny's avatar Evgeny (2012-06-26 12:24:20 -0500) edit
add a comment see more comments