I have a Django 1.5.5 project that uses South 0.8.2. Everything works great -- including migration using South. When I attempt to upgrade this project to South 0.8.3, I get the following error when I run python manage.py migrate
:
(VBEZ)vagrant@vagrant-ubuntu-precise-64:/vagrant$ python manage.py migrate
Running migrations for django_mailbox:
- Nothing to migrate.
- Loading initial data for django_mailbox.
Installed 3 object(s) from 1 fixture(s)
Running migrations for djcelery:
- Nothing to migrate.
- Loading initial data for djcelery.
DeserializationError: Problem installing fixture 'initial_data.json': Invalid model identifier: 'sites.site'
What has happened?
Here is my initial_data.json
file:
[
{
"pk": 1,
"model": "sites.site",
"fields": {
"domain": "0.0.0.0:5000",
"name": "Project (Development)"
}
},
{
"pk": 2,
"model": "sites.site",
"fields": {
"domain": "project-staging.example.com",
"name": "Project (Staging)"
}
},
{
"pk": 3,
"model": "sites.site",
"fields": {
"domain": "project.example.com",
"name": "Project"
}
}
]
Here is what a successful migration using South 0.8.2 looks like:
Running migrations for django_mailbox:
- Nothing to migrate.
- Loading initial data for django_mailbox.
Installed 3 object(s) from 1 fixture(s)
Running migrations for djcelery:
- Nothing to migrate.
- Loading initial data for djcelery.
Installed 3 object(s) from 1 fixture(s)
Running migrations for taggit:
- Nothing to migrate.
- Loading initial data for taggit.
Installed 3 object(s) from 1 fixture(s)
Running migrations for eee_core:
- Nothing to migrate.
- Loading initial data for eee_core.
Installed 3 object(s) from 1 fixture(s)
Running migrations for core:
- Nothing to migrate.
- Loading initial data for core.
Installed 3 object(s) from 1 fixture(s)
Things I have looked at/tried:
django-contrib-sites
is in my `INSTALLED_APPS'initial_data.json
file is removed.python manage.py migrate myapp
.Thanks.
Looks like this a known bug in South 0.8.3: http://south.aeracode.org/ticket/1320. Fix is expected in a week or so.
Update: South 0.8.4 fixes this bug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With