Ask Your Question
0

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

asked 2012-06-25 12:05:27 -0500

powlo gravatar image

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)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-06-25 12:24:27 -0500

updated 2012-06-25 12:24:47 -0500

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
edit flag offensive delete link more

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 gravatar imagepowlo ( 2012-06-26 09:15:44 -0500 )edit

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

Evgeny gravatar imageEvgeny ( 2012-06-26 12:24:20 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-06-25 12:05:27 -0500

Seen: 51,366 times

Last updated: Jun 25 '12