First time here? Check out the FAQ!

Migration errors using latest git branch

I am trying to migrate askbot to the latest version available in devel branch and running : python migrate i got the following error:

    Traceback (most recent call last):
  File "", line 11, in <module>
  File "/var/www/", line 362, in execute_manager
  File "/var/www/", line 303, in execute
  File "/var/www/", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/var/www/", line 222, in execute
    output = self.handle(*args, **options)
  File "/var/www/", line 105, in handle
    ignore_ghosts = ignore_ghosts,
  File "/var/www/", line 171, in migrate_app
    applied = check_migration_histories(applied, delete_ghosts, ignore_ghosts)
  File "/var/www/", line 74, in check_migration_histories
    m = h.get_migration()
  File "/var/www/", line 34, in get_migration
    return self.get_migrations().migration(self.migration)
  File "/var/www/", line 31, in get_migrations
    return Migrations(self.app_name)
  File "/var/www/", line 60, in __call__
    self.instances[app_label] = super(MigrationsMetaclass, self).__call__(app_label_to_app_module(app_label), **kwds)
  File "/var/www/", line 88, in __init__
    self.set_application(application, force_creation, verbose_creation)
  File "/var/www/", line 160, in set_application
    raise exceptions.NoMigrations(application)
south.exceptions.NoMigrations: Application '<module 'askbot.deps.django_authopenid' from '/var/www/'>' has no migrations.

Also if I drop all tables and try to do a new install following the documentation, I got the following error:

$ python migrate django_authopenid
The app 'django_authopenid' does not appear to use migrations. ./ migrate [appname] [migrationname|zero] [--all] [--list] [--skip] [--merge] [--no-initial-data] [--fake] [--db-dry-run] [--database=dbalias]

Adi Roiban's avatar
Adi Roiban
updated 2011-03-24 06:41:05 -0500, asked 2011-03-24 06:36:17 -0500
edit flag offensive 0 remove flag close merge delete


what happens if you do a "migrate --list" It should list the migrations without doing them. I think in general, you should just issue a "migrate" command, without specifying the app.
Benoit's avatar Benoit (2011-03-24 08:39:15 -0500) edit
Thanks for you comment! It looks like „django_authopenid” is listed and has 5 revisions. I am just following the documentation and information available at
Adi Roiban's avatar Adi Roiban (2011-03-24 09:02:31 -0500) edit
If your site has no useful data - I would just start the database setup over. Drop the database, then syncdb and migrate.
Evgeny's avatar Evgeny (2011-03-24 13:54:42 -0500) edit
add a comment see more comments

1 Answer


Adi, have you done python flush some time before the upgrade?

If so - then the migration history was erased from the database and the only way to recover is to "fake"-migrate the apps to the pre-upgrade stage. And then run the actual upgrade the command is:

python migrate <the_app> <schema_version> --fake

But you need to know to what schema version to go, for example:

python migrate django_authopenid 0005 --fake

Secondly - might have you accidentally removed app django_authopenid from the list of installed apps?

Evgeny's avatar
answered 2011-03-24 13:52:59 -0500
edit flag offensive 0 remove flag delete link


Thanks for the answer. The django_authopenid was not removed... not sure what was the problem. It was still in testing so I just done a clean reinstall. I have also tested a new update and this time it was ok (but i think that no DB migration were required).
Adi Roiban's avatar Adi Roiban (2011-04-04 04:45:48 -0500) edit
add a comment see more comments