Add a RenameModel mutation for handling model renames.

Review Request #6216 — Created Aug. 12, 2014 and submitted — Latest diff uploaded

Information

Django Evolution
master
dce0e20...

Reviewers

The new RenameModel mutation allows an evolution to indicate that a
model has been renamed. This handles updating the signature for any
related ForeignKeys or ManyToManyFields and generating any SQL to
perform the table rename (if needed).

For the unit tests, some work was needed to allow models to be added
before the base test model, in order for model creation/destruction to
happen in the right orders.

Unit tests for sqlite3, MySQL (InnoDB and MyISAM), and Postgres all pass.

Hand-tested against my sqlite3 database and a copy of a production MySQL
database using InnoDB.

    Loading...