Write SQL and interact with your RDBMS directly?
Write SQL and interact with your RDBMS directly?
Even if you don't use South's automatic migration generation, its database-independent schema modification api [1], dependency tracking, and tracking of which migrations have been run, are useful and necessary. In fact, the automatic generation of migrations is an optional feature of South that was not in it when first released.
When you need to write SQL and interact with your database directly, using `db.execute` inside a South migration is a nice way to do it.
[1]: http://south.readthedocs.org/en/latest/databaseapi.html
so I ask again: what's your alternative (given that avoiding raw SQL scripts is the problem you're trying to solve)?
But I mean idempotent SQL takes care of the vast majority of all this stuff you mentioned. Write your SQL properly and it doesn't matter whether or not it's been applied before.