Django Simple Migrations

The following is a simple django custom management command to handle model field additions and deletions on a development machine (not for production use.) It automates a common pattern in django development – that of renaming an existing table, recreating via syncdb, and inserting the old data into the new table. Right now it doesn't handle renames, and is only tested using an sqlite backend. With mysql or postgres, I would suggest manually making table changes anyway, since – unlike sqlite – they have that capability.

If you're after a more comprehensive migration system suitable for production use, I'd recommend South.

Download the code at

Source Code