django-evolution on multi-db

Review Request #1716 — Created July 16, 2010 and submitted

Information

Django Evolution (deprecated)

Reviewers

This patch is a (working) attempt to manage multi-db schemas.

I have successfully tested it on the reviewboard schema (from version 1.0.4 to 1.5).

To use it, just do as you would have used syncdb:

./manage.py evolve --database my_db

If you have any comments, don't hesitate.
A new test named multi_db has been created, but for obscure reasons, it doesn't work properly. All other tests passed. If you have any idea...
chipx86
  1. This is an awesome change. Sorry it took me so long to get to it.
    
    There's some syntactical stuff I'd normally ask to be fixed, but since I'm the new maintainer and most of the code isn't in my normal style, I'm just going to skip all that :)
    
    A few suggestions, and then of course the unit test failure problem...
    1. Made the changes, fixed the unit test infrastructure to work properly, and committed as r188.
  2. /trunk/django_evolution/management/commands/evolve.py (Diff revision 1)
     
     
     
     
     
     
     
    Could be rewritten as:
    
    mutations = [mutation for mutation in temp_mutations
                 if mutation.is_mutable(app_label, database_sig, database)]
  3. This appears to undo the CommandError change, which should be fixed. We don't really want to force an exit, in case we're being called by another module here.
  4. This seems to be failing because nothing ever defines 'db_multi' in settings.DATABASES. Probably need to add this to test/settings.py and convert over the old database keys.
  5.