15

Django 1.7 has built-in database migration mechanizm. However, I'd like to run South migrations for the ols third-party django apps.

I failed to to 'syncdb' management command with Django 1.7 in order to create South models:

/south/management/commands/syncdb.py", line 82, in handle_noargs
old_app_store, cache.app_store = cache.app_store, SortedDict([

AttributeError: 'Apps' object has no attribute 'app_store'
karthikr
  • 97,368
  • 26
  • 197
  • 188
Daria
  • 753
  • 7
  • 22
  • 1
    Created south_migrationhistory table with Django 1.6 – Daria May 19 '14 at 04:38
  • Now getting this error on syncdb: /south/hacks/django_1_0.py", line 68, in clear_app_cache self.old_app_models, cache.app_models = cache.app_models, {} AttributeError: 'Apps' object has no attribute 'app_models' – Daria May 19 '14 at 04:38
  • Any resolution to this? Mysterious. – shacker Jun 03 '14 at 07:35

3 Answers3

11

If you started a project on Django 1.6 but have upgraded to Django 1.7, you may not see this error immediately. But if you then do a fresh checkout and db build for the project, this mysterious error will crop up.

The solution is to remove South from your INSTALLED_APPS (and likely pip's requirements.txt as well). You don't need them anymore.

shacker
  • 14,712
  • 8
  • 89
  • 89
10

On official South site:

South will not work with Django 1.7; it supports only versions 1.4, 1.5 and 1.6.

The only solution I can see is to create django 1.7 for third-party applications within your project using MIGRATION_MODULES setting. When these third-party applications will supply django 1.7 migrations. you should remove your migrations and do migrate --fake with application migrations.

Sergey Fedoseev
  • 2,800
  • 2
  • 18
  • 16
  • I have not tried this solution because the project I needed it for is finished on Django 1.6, but looks like your answer is the closest. – Daria Sep 15 '14 at 03:06
  • I was trying to migrate all this time and nothing happened. Thank for you answer! – Valter Silva Oct 13 '14 at 19:44
2

https://docs.djangoproject.com/en/1.7/topics/migrations/#upgrading-from-south

This is part of the stable 1.7 release. You should utilise this process if you're upgrading from 1.6 to 1.7

Llanilek
  • 3,386
  • 5
  • 39
  • 65
  • Thank you, now that 1.7 release is stable, it is possible. But I was asking about 3d party Django apps I am using in my project. I can't just remove their migrations. Hopefully, the rest of Django community will move on soon. – Daria Sep 08 '14 at 04:13