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
10
votes
2 answers

How to unit test a Django South "datamigration"

I created a data migration using south, that takes a versions table and converts it from: major: 1, minor: 2, micro: 3, release: a into a simpler: name: 1.2.3.a Now I want to test this datamigration using django unit testing (1.3beta). How can I…
Evgeny
  • 6,533
  • 5
  • 58
  • 64
10
votes
1 answer

Maintaining South migrations on Django forks

I'm working on a pretty complex Django project (50+ models) with some complicated logic (lots of different workflows, views, signals, APIs, background tasks etc.). Let's call this project-base. Currently using Django 1.6 + South migrations and quite…
sttwister
  • 2,279
  • 1
  • 19
  • 23
10
votes
1 answer

Django-reversion and south compatibility

Does django-reversion work well with south migrations? Are django-reversion and south compatible? Current versions: - reversion - 1.2.1 - south - 0.7.1
Jonathan Livni
  • 101,334
  • 104
  • 266
  • 359
10
votes
1 answer

Django database hung in migration

EDIT: I solved the issue. The problem was that I had a shell open with a database connection to that model. I exited the shell, and everything continued. I just migrated my database with south, but rather than migrating one app, i accidentally…
skzryzg
  • 1,020
  • 8
  • 25
10
votes
3 answers

How to fix Django South issue with regards to localflavor in Django 1.5?

I'm starting a new project and I'm using Django 1.5. I found out that the localflavor stuff has been removed from Django 1.5 and is now a separate installable package. So I installed it. In my models.py I'm importing the U.S. localflavors to get my…
user338413
  • 689
  • 2
  • 8
  • 20
10
votes
1 answer

django and south migration with conflicts (0007_two ... and 0007_one) how to solve?

I want to use south in my django project as migration tool, but I have problem with using south in multiuser scenario: Two devs working concurrently on different machines create two migrations with same number on first PC: 0007_extend_lizard.py on…
Andrzej Śliwa
  • 1,684
  • 2
  • 14
  • 17
10
votes
2 answers

"cannot be cast to type integer" error

This is my first question so I will appreciate patience. I changed a few attributes to IntegerField from CharField. Listed below is the code: rating_choices = ( (1,"1"), (2,"2"), (3,"3"), (4,"4"), (5,"5"), ) class…
Badi8beach
  • 556
  • 2
  • 4
  • 18
10
votes
6 answers

South: Unknown command 'migrate'

I'm getting a merciless $ python manage.py migrate Unknown command: 'migrate' Type 'manage.py help' for usage. I pulled the code from github onto a fresh computer. This code is tested and is working on other computers. The entire code runs fine…
Alexandre
  • 2,073
  • 4
  • 21
  • 24
10
votes
1 answer

django-south migration order

South run migrations per app not in order migrations where created. This may cause some problem with dependencies between migrations. Sometimes it's needed to add depends_on attribute to migration class. Is it possible to run south-migration in…
matkk
  • 115
  • 1
  • 8
9
votes
1 answer

Using South to convert ForeignKey TO ManyToManyField not working out

I am using South to change a ForeignKey TO ManyToManyField in one of the models in Django but it is not working out as expected. # Original Schema class Item(models.Model): category = models.ForeignKey(Category, default=default_category) To be…
Chantz
  • 5,883
  • 10
  • 56
  • 79
9
votes
2 answers

ManyToManyField and South migration

I have user profile model with M2M field class Account(models.Model): ... friends = models.ManyToManyField('self', symmetrical=True, blank=True) ... Now I need to know HOW and WHEN add each other as a FRIEND And I created a model for…
srusskih
  • 567
  • 4
  • 9
9
votes
2 answers

South doesn't create default permissions on new models in time for latter migrations to use them

I'm not 100% sure I'm doing this right, but I think I've found an issue where auth.Permission objects aren't being created soon enough for migrations to use them when you initialize a DB from scratch. The important details: I'm trying to initialize…
glenc
  • 3,132
  • 2
  • 26
  • 42
9
votes
1 answer

Changing South Migration Directory

How do you change the location where South looks for an app's migrations? By default, South assumes an app's migrations are in /migrations. However, I've migrated the model of a third-party package which is installed at…
Cerin
  • 60,957
  • 96
  • 316
  • 522
9
votes
2 answers

'Permission' instance expected, got ... Permission instance?

I try to write data migration code for custom user type but when I try to apply migration I get this: TypeError: 'Permission' instance expected, got Looks weird to me. Isn't that a Permission…
Dmitrii Mikhailov
  • 5,053
  • 7
  • 43
  • 69
9
votes
1 answer

Django 1.7 vs Django1.6 vs Django 1.5

I have been developing using Django 1.5 a lot. Is it worth the time to shift from Django 1.5 to Django 1.6 or Django 1.7? I know, In 1.7, migration is into the core of Django. How different is it from south?
user3133084