I'm trying to evolve a very old database (Beta 0.8) to version 1.5,
and running into a problem.  When I try the command: rb-site manage /
site/www/legacyrb evolve -- --execute
I get the message:
        The stored evolutions do not completely resolve all model changes.
        Run `./manage.py evolve --hint` to see a suggestion for the changes
        The following are the changes that could not be resolved:
        In model reviews.DefaultReviewer:
            Field 'repository' has been added
        In model reviews.ReviewRequest:
            Field 'changedescs' has been added
            Field 'shipit_count' has been added
            Field 'last_review_timestamp' has been added
            In field 'repository':
                Property 'null' has changed
        In model diffviewer.FileDiff:
            Field 'status' has been added
            Field 'parent_diff' has been added
            Field 'diff' has been added
            Field 'diff_base64' has been deleted
            In field 'source_file':
                Property 'max_length' has changed
            In field 'dest_file':
                Property 'max_length' has changed

Question 1: Ummm...why couldn't those changes be resolved?  Will they
be resolved with a syncdb?

So I follow the command's advice, and execute "evolve --hint", which
tells me (among other things):
        #----- Evolution for diffviewer
        from django_evolution.mutations import *
        from django.db import models

        MUTATIONS = [
            AddField('DiffSet', 'basedir', models.CharField, initial=u'',
            AddField('FileDiff', 'status', models.CharField, initial=<<USER
VALUE REQUIRED>>, max_length=1),
            AddField('FileDiff', 'parent_diff', models.Base64Field,
initial='', db_column='parent_diff_base64'),
            AddField('FileDiff', 'diff', models.Base64Field, initial=<<USER
VALUE REQUIRED>>, db_column='diff_base64'),

So I figure, "Okay, we have the hints--we just need to execute them."
So I ran:
        # rb-site manage /infrastructure/www/legacyrb evolve -- --hint --
        Cannot use hinted evolution: AddField or ChangeField mutation for
'FileDiff.status' in 'diffviewer' requires user-specified initial

So, questions:
2) How can I specify an appropriate user value?
3) The evolution file for filediff.status, where a USER VALUE REQUIRED
        AddField('FileDiff', 'status', models.CharField, initial='M',
Looks to me like an initial value is there, and it's an 'M'.  What's
the problem?
4) Can I use evolution in this case, or do I need to resort to just
making the required changes at the SQL level?  If so, how are the
'db_column' parameters handled?



Want to help the Review Board project? Donate today at 
Happy user? Let us know at http://www.reviewboard.org/users/
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to