class Migration(SchemaMigration):

    def forwards(self, orm):
        db.rename_table('myapp_foo', 'myapp_bar')
if not db.dry_run:
    orm['contenttypes.contenttype'].objects.filter(app_label='myapp', model
        ='foo').update(model='bar')

def backwards(self, orm):
    db.rename_table('myapp_bar', 'myapp_foo')
if not db.dry_run:
    orm['contenttypes.contenttype'].objects.filter(app_label='myapp', model
        ='bar').update(model='foo')
Easiest way to rename a model using Django/South?