South enables schema and data migration of a django-backend database []. Migrations should be version-controlled [].

Adding South

In order to add South to Django project, development & production do the following []: :: $ ./ snycdb $ ./ convert_to_south myproject.myapp $ ./ schemamigration myproject.myapp --auto # Change models $ ./ migrate myproject.myapp # Alternatively to get a fresh Django database with existing South migrations

sync all tables and perform fake migration []: :: $ ./ syncdb --all $ ./ migrate --fake

If required south can be resetted [;!topic/south-users/PxEskcnkibc[1-25];!msg/south-users/iIQT8ZWs2cI/GQ4kONoT5Q4J[1-25]].

Migrate through the history

To go back in forward in the south migration history simply define the migration to move: ::

$ ./ migrate <appname> 0005

Renaming a Django App

South allows to rename a django app, through some manual steps are required [].

A step-by-step example of renaming django app, managed by South migration history is described here:

Moving a Model from one App to another

Moving models between apps is straightforward

$ ./ schemamigration specific create_cat --auto
$ ./ schemamigraiion common drop_cat --auto

Edit post (Admin)

Comment on This Data Unit