Search code examples
djangodjango-southdjango-migrations

django south internal db functions in django 1.7


I have a project that was using the following internal db commands from South and was wondering if anyone knows how to do the same in django 1.7's new migrations.

from south import db
...
db.delete_column(table,name)
...
db.add_column(table, name, field, keep_default=False)
....

Thanks


Solution

  • The new functionality is fully documented. In your case you want AddField and RemoveField.

    There is also a lower-level interface available via the SchemaEditor class.