Search code examples
djangodjango-south

Is it possible to use South without recording the migrations?


Let's say, I start with an app:

class MyModel(models.Model):
    f = models.CharField(...)

This structure is recorded in migrations/0001_initial.py.

I add 2 fields:

    g = models.IntegerField(default=0)
    h = models.CharField(max_length=10, blank=True)

I create a migration:

manage.py schemamigration myapp --auto

migrations/0002_add_field_g_add_field_h.py

Soon I remove the `g field. If I run schemamigration, there will be the 3rd migration. But all this was development process, and when I push to DVCS server for the rest of my team, I don't need to send all the test migrations that I made. I need only the end product. How can this be done in South?


Solution

  • it's possible but a bit of a faff. in particular you need to make sure all your test migrations are reversible

    when you are done testing, you can roll back all your test migrations, and then delete the migration files and re-run ./manage schemamigration