Add schema evolution compatibility for Django 1.7, 1.8, and 1.9.

Review Request #8549 — Created Nov. 21, 2016 and discarded

Information

Django Evolution

Reviewers

This updates the compatibility modules in Django Evolution to support
Django 1.7 through 1.9. These make use of the new Schema Editor
functionality introduced with Django 1.7's migration feature to generate
SQL equivalent to what these versions of Django would generate, helping
us to stay compatible in the future.

Not all of the Schema Editor support is public, and not all of the logic
we need is even accessible, so we are forced to access private functions
and re-implement logic here and there, but generally, it's pretty
reasonable.

Each of the newly-supported versions of Django generate SQL differently
from older versions, and differently from each other. In some cases,
these are enough where we have to actually compare against sample SQL
datasets specific to certain versions of Django.

This change is not sufficient to actually enable evolution for a
project. It just brings API compatibility. The work to make evolutions
and migrations work together will be a whole separate project.

Testing Done:
Unit tests pass against Django 1.6, 1.7, 1.8, and 1.9 for SQLite,
MySQL, and Postgres.

Reviewed at https://reviews.reviewboard.org/r/8109/

 
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        django_evolution/mutations.py
        django_evolution/tests/test_delete_field.py
        django_evolution/db/common.py
        django_evolution/compat/apps.py
        django_evolution/tests/test_index_together.py
        django_evolution/compat/db.py
        django_evolution/tests/test_database_sig.py
        django_evolution/tests/db/sqlite3.py
        django_evolution/tests/utils.py
        django_evolution/tests/test_add_field.py
        django_evolution/tests/db/postgresql.py
        django_evolution/db/mysql.py
        tests/runtests.py
        django_evolution/tests/test_preprocessing.py
        django_evolution/db/postgresql.py
        django_evolution/tests/db/mysql.py
        django_evolution/management/__init__.py
        django_evolution/compat/models.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        django_evolution/mutations.py
        django_evolution/tests/test_delete_field.py
        django_evolution/db/common.py
        django_evolution/compat/apps.py
        django_evolution/tests/test_index_together.py
        django_evolution/compat/db.py
        django_evolution/tests/test_database_sig.py
        django_evolution/tests/db/sqlite3.py
        django_evolution/tests/utils.py
        django_evolution/tests/test_add_field.py
        django_evolution/tests/db/postgresql.py
        django_evolution/db/mysql.py
        tests/runtests.py
        django_evolution/tests/test_preprocessing.py
        django_evolution/db/postgresql.py
        django_evolution/tests/db/mysql.py
        django_evolution/management/__init__.py
        django_evolution/compat/models.py
    
    
  2. 
      
david
Review request changed
Status:
Discarded