Hacker News new | ask | show | jobs
by christianmann 4525 days ago
I wonder if there will be a tool to convert (migrate?) South migration data to Django's native format.
3 comments

The recommended upgrade path seems to be:

* Apply all South migrations to all database servers,

* Delete South migrations,

* Create new initial (create table) migrations for the current schema.

This makes sense, as migration code is supposed to be temporary. Migrations should exist in the codebase until the last database has them applied. Once all databases are up-to-date, it's better to delete them and "rebase" migrations to the current schema.

Old, fully applied migrations will still stay documented in the version control history, but they shouldn't be part of the master tree, much like obsolete code should be deleted instead of left commented out.

This has the added advantage of removing old, crufty migrations. We do this every few months, as there will usually be some problem that will prevent migrations from applying cleanly on new installations (someone made a mistake and reverted imperfectly, something collided and the resolution didn't delete some data, etc).
It has been stated by Andrew Godwin (author of South and the new native migrations) that there will be a clear path to switch from South to native migrations. And also for people who can't upgrade to 1.7 there should be South 2 with some of the new features backported from native migrations.
South2: https://github.com/andrewgodwin/south2 "This is the repository for South 2, the backport of Django's migrations code into a separate installable package for Django 1.4, 1.5 and 1.6."