Simplify and speed up migrations by using raw SQL

With just a few lines of raw SQL (and tweaking a bit of South's auto-generated migration code), 6 tricky migrations become one relatively simple one. Well.