Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

south migration: DatabaseOperations has not attribute 'shorten_name'

I have a model which I managed to migrate on two different computers without a problem. However on my server I'm getting the following error:

Error in migration: some_app:0002_auto__some_migration

AttributeError: 'DatabaseOperations' object has no attribute 'shorten_name'

Inspecting the migration file I see a line:

    m2m_table_name = db.shorten_name(u'some_app_some_class_some_attribute')

which could be the culprit. (there are a few lines which use this shorten_name. I'm not sure how to solve this.

The virtual environment on my server has South 0.7.6, Django 1.5 (and a Postgis enabled postgres)

like image 534
Massagran Avatar asked Sep 14 '13 13:09

Massagran


1 Answers

The error originates from a version conflict. You migration might have been created with a later version of South (probably in your dev environment) and your production version runs on a earlier version.

Compare the version numbers of the South installations with

pip freeze

and see which South version is listed in both environments.

like image 151
neurix Avatar answered Nov 20 '22 20:11

neurix