mozilla/fxoss — pull request #9 by mlavin (2014-01-30 22:07:52+00:00)
Title: Translation Migrations

This builds off of #3 and is one approach to managing the migrations for the translation fields. This internalizes the South migrations for Mezzanine `core`, `forms` and `pages`. Adding new languages would add a new migration to add the related translation columns. It's pretty explicit and clear.

However it still has some problems. Namely that if a future Mezzanine upgrade required a migration that would need to be duplicated here by generating the migration. So far South has been very poor at generating the migrations and I've had to manually adjust the migrations to remove duplicate columns or column references which don't belong to the correct table. In particular `Form` extends from `Page` and South tries to add columns to the `Form` table which already exist on the `Page` table.

An alternate approach is to use `sync_translation_fields` to add the columns outside of the South migrations. However there is no clear history there. Nor am I familiar with how this handles failures with the `ALTER` statements. South is a much more proven application in this regard.