Questions tagged [django-south]

Tool to provide consistent, easy-to-use and database-agnostic database migrations for Django applications. Deprecated since Django 1.7.

South was a tool to provide consistent, easy-to-use and database-agnostic s for applications.

Since Django 1.7, the features previously provided by South are included directly in Django.

1022 questions
14
votes
2 answers

Trouble getting Django set up on Heroku using South - keep getting ProgrammingError: relation does not exist

This is what I've been doing: Locally - where I've got a brand new postgres database, and two models.py files from two different apps: python manage.py syncdb python manage.py schemamigration api --initial python manage.py schemamigration extapi…
Andrew Konoff
  • 571
  • 1
  • 3
  • 11
14
votes
1 answer

Django South migration to different databases

Does South honor database routers? I set up routers to route certain apps to one DB, and all other apps to the default DB. I even made sure that South migrationhistory table is in both DBs. But I can't get South to only apply migrations in the…
Overclocked
  • 1,187
  • 1
  • 11
  • 22
14
votes
4 answers

Django syncdb and migrate

I'm moving django website from one server to another, and I tried to syncdb, so i've put python manage.py syncdb, and i get this output: Syncing... Creating tables ... The following content types are stale and need to be deleted: orders |…
miszczu
  • 1,179
  • 4
  • 19
  • 39
13
votes
3 answers

How to disable south debug logging in django?

When I run my tests in Django, after a fail I got several pages of debug output from South, like these: south: DEBUG: south execute "CREATE INDEX "sometable_4d5bad5" ON "video_playable" ("network_id");" with params "[]" south: DEBUG: south execute…
lfagundes
  • 2,978
  • 5
  • 24
  • 25
13
votes
2 answers

Migrate Django model to unique_together constraint

I have a model with three fields class MyModel(models.Model): a = models.ForeignKey(A) b = models.ForeignKey(B) c = models.ForeignKey(C) I want to enforce a unique constraint between these fields, and found django's…
jkeesh
  • 3,289
  • 3
  • 29
  • 42
13
votes
1 answer

South ignores change in field default value in Python / Django

Why does South not recognize changes in default field values in Python models? For example, take this existing model that is migrated with south: class MyFamily(models.Model): family_size = models.IntegerField(verbose_name="What is your family…
MontyThreeCard
  • 821
  • 9
  • 14
13
votes
1 answer

Django South error with initial migration

I have a new Django 1.3 project and app that I've created. I added south to my settings.py and have not yet run syncdb. When I execute the following commands per the South tutorial and documentation, I received the error shown below. Any thoughts…
Matthew Rankin
  • 457,139
  • 39
  • 126
  • 163
13
votes
3 answers

PyDev in Eclipse does not recognize db.add_column from South

I have just installed South (0.7.3, python-2.6) and successfully completed the tutorial using the python interpreter. Meaning that I am able to create a model and migrate it without any errors, so South appears to be working fine in the python…
crcarlson
  • 189
  • 1
  • 11
13
votes
1 answer

Django-South introspection rule doesn't work

I'm using Django 1.2.3 and South 0.7.3. I am trying to convert my app (named core) to use Django-South. I have a custom model/field that I'm using, named ImageWithThumbsField. It's basically just the ol' django.db.models.ImageField with some…
Ory Band
  • 14,716
  • 14
  • 59
  • 66
13
votes
2 answers

How do I create a new database for an existing App using Django South and set default values?

I'm working with an OS project that uses South to migrate the database. I'm building a new database from scratch and I want to make sure South is setup so I can easily update the database in the future. It seems this process should be: create the…
BryanWheelock
  • 12,146
  • 18
  • 64
  • 109
13
votes
3 answers

Adding South to Django project, development & production

Adding South to an existing Django project. I have it installed on both the development machine and the "production" server. I've done the following on the development machine, then: added South app to settings.py, python manage.py syncdb python…
Headcrab
  • 6,838
  • 8
  • 40
  • 45
13
votes
4 answers

How to rename a foreignkey field with South?

Renaming a simple charfield etc seems easy (Django - How to rename a model field using South?) However when I try using the same on a ForeignKey field I get an error: _mysql_exceptions.OperationalError: (1091, "Can't DROP '[new_fkey_field_name]';…
GJ.
  • 5,226
  • 13
  • 59
  • 82
13
votes
5 answers

There is no South database module 'south.db.postgresql_psycopg2' for your database django

I have a django app with version as 1.6.5, i am trying to upgrade it to 1.8, but on the way i got the below error right after the django version was increased to 1.8 There is no South database module 'south.db.postgresql_psycopg2' for your…
Shiva Krishna Bavandla
  • 25,548
  • 75
  • 193
  • 313
13
votes
1 answer

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…
Massagran
  • 1,781
  • 1
  • 20
  • 29
13
votes
5 answers

Pass South random unique default values when migrating

I am trying to forward migrate a model with existing data. The model has a new field with constraints unique=True and null=False. When I do ./manage.py schemamigration myapp --auto South lets me specify a default value for the new field by…
mzu
  • 759
  • 8
  • 20