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
52
votes
5 answers

-bash: ./manage.py: Permission denied

After running: $ ./manage.py migrate I am getting the following error: -bash: ./manage.py: Permission denied Trying to run a migration after making a change in the DB. Any advice would be really appreciated.
ssherwin
  • 531
  • 1
  • 4
  • 3
45
votes
2 answers

django 1.7 migrations -- how do I clear all migrations and start over from scratch?

So I'm rapidly iterating on a django app at the moment and I'm constantly adjusting models.py. Over the course of a day or two of programming and testing I generate a couple dozen migration files. Sometimes I really tear the schema apart and…
tadasajon
  • 14,276
  • 29
  • 92
  • 144
41
votes
2 answers

Disable Django South when running unit tests?

Disable Django South when running unit tests? How do you avoid running all of the south migrations when doing django unit testing?
MikeN
  • 45,039
  • 49
  • 151
  • 227
35
votes
6 answers

Error creating new content types. Please make sure contenttypes is migrated before trying to migrate apps individually

I am trying to migrate from Django 1.6 to Django 1.8. I was using South for managing migrations in Django 1.6. I have successfully created new migration files by python manage.py makemigrations. while running python manage.py migrate --fake-initial,…
Shubham
  • 3,071
  • 3
  • 29
  • 46
35
votes
4 answers

Revert Django 1.7 RemoveField migration

If I have a non-nullable model field, remove it, and create a migration, that migration becomes non-reversible: Consider the following model: class Foo(models.Model): bar = models.TextField() test = models.TextField() # This field is to go…
Ilya Semenov
  • 7,874
  • 3
  • 30
  • 30
35
votes
1 answer

Currently using Django "Evolution", is "South" better and worth switching?

I'm currently using Django evolutions to manage my product's database evolutions. It's not perfect but I've learned to live with its flaws. For instance, I always have to copy my production database to test before moving out a new schema because…
MikeN
  • 45,039
  • 49
  • 151
  • 227
34
votes
5 answers

Migrating existing auth.User data to new Django 1.5 custom user model?

I'd prefer not to destroy all the users on my site. But I want to take advantage of Django 1.5's custom pluggable user model. Here's my new user model: class SiteUser(AbstractUser): site = models.ForeignKey(Site, null=True) Everything works…
B Robster
  • 40,605
  • 21
  • 89
  • 122
33
votes
6 answers

Renaming an app with Django and South

I am renaming an application to a more suitable name. In doing so, I want to ensure that South properly migrates the database (renames database tables and changes references in django_content_type or south_migrationhistory). I know how to migrate…
Trey Hunner
  • 10,975
  • 4
  • 55
  • 114
33
votes
1 answer

Migrating ManyToManyField to null true, blank true, isn't recognized

I have made a model change from standard = models.ManyToManyField(Standard) to standard = models.ManyToManyField(Standard, blank=True, null=True) South schemamigration for this app doesn't recognize the change? Similar to this question, which is…
32
votes
4 answers

Using south to refactor a Django model with inheritance

I was wondering if the following migration is possible with Django south and still retain data. Before: I currently have two apps, one called tv, one called movies, each with a VideoFile model (simplified here): tv/models.py: class…
Andre Miller
  • 15,255
  • 6
  • 55
  • 53
29
votes
1 answer

Testing Django apps that use South migrations

I'm trying to create some Functional tests for a Django app that uses South migrations. Eventually, I will also be creating Twill tests. When I try to run the existing tests, the test database is not created successfully because of a problem with…
BryanWheelock
  • 12,146
  • 18
  • 64
  • 109
29
votes
3 answers

How to call a static methods on a django model class during a south migration

I'm writing a data migration in south to fix some denormalized data I screwed up in earlier code. The way to figure out the right value for the incorrect field is to call a static method on the django model class. The code looks like this: class…
Leopd
  • 41,333
  • 31
  • 129
  • 167
28
votes
5 answers

Django - South - Is There a way to view the SQL it runs?

Here's what I want to do. Develop a Django project on a development server with a development database. Run the south migrations as necessary when I change the model. Save the SQL from each migration, and apply those to the production server when…
Greg
  • 45,306
  • 89
  • 231
  • 297
28
votes
1 answer

reverse engineer mysql database to create django app

I basically want to take an existing mysql database structure created and used by a php app (codeigniter framework) and reverse engineer it to a django app. is there some tool to do this? south migrations maybe?
Rasiel
  • 2,823
  • 6
  • 31
  • 37
27
votes
2 answers

Workflow for Using Django South with Multiple Code Branches

I'm curious as to how other Django devs manage their database migrations with South when developing with multiple code branches. Let me give a sample scenario. Say for example you start you development with your main trunk. You create Branch A from…
Edwin
  • 803
  • 1
  • 11
  • 19
1
2
3
68 69