537: manage.py evolve not working

t**@alsop-fa******** (Google Code) (Is this you? Claim this profile.)
Aug. 2, 2008
What steps will reproduce the problem?

I ran "svn update ." in the reviewboard install directory to get latest
version.

./manage.py syncdb
./manage.py evolve --hint --execute

What do you see instead?

# ./manage.py evolve --hint --execute
ChangeField does not support modifying the 'unique' attribute.
#

What operating system are you using? What browser?

RHEL5 Linux
Firefox browser

Please provide any additional information below.

For some reason my database needs to be updated, and when I use manage.py
to update it to latest schema I get error as shown above. If I run
manage.py evolve without the --execute, I can see what it is trying to
change (example below).

MUTATIONS = [
    ChangeField('DiffSet', 'id', initial=None, unique=True),
    ChangeField('DiffSetHistory', 'id', initial=None, unique=True),
    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'),
    DeleteField('FileDiff', 'diff_base64'),
    ChangeField('FileDiff', 'id', initial=None, unique=True)
]

It fails when trying to change the unique attribute on the DiffSet field,
which means that new fields such as FileDiff are not added.

Do I need to destroy the database and create it again ? If so, how do I do
this ?
chipx86
#1 chipx86
I recommend subscribing to the reviewboard listserv, as there was an announcement
about this.

Right now, Django Evolution is broken with Django SVN. You can fix this by updating
Django to revision 7789. Type the following in the Django checkout directory:

  $ svn up -r 7789

I've provided a patch to the Django Evolution guys. Once they include it, this will
be taken care of for good.
#2 t**@alsop-fa******** (Google Code) (Is this you? Claim this profile.)
Thankyou. That worked. I will check for a fix to this before I next update Django
from trunk.
#3 t**@alsop-fa******** (Google Code) (Is this you? Claim this profile.)
Do you know if this fix has been applied to django evolution yet ?
david
#4 david
Yes, django-evolution HEAD should work now.  Closing this out.
  • +Fixed