sureshvv / reviewboard

Automatically exported from code.google.com/p/reviewboard
0 stars 0 forks source link

manage.py evolve not working #537

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 ?

Original issue reported on code.google.com by t...@alsop-family.com on 13 Jul 2008 at 8:15

GoogleCodeExporter commented 9 years ago
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.

Original comment by chip...@gmail.com on 13 Jul 2008 at 8:42

GoogleCodeExporter commented 9 years ago
Thankyou. That worked. I will check for a fix to this before I next update 
Django
from trunk.

Original comment by t...@alsop-family.com on 13 Jul 2008 at 4:24

GoogleCodeExporter commented 9 years ago
Do you know if this fix has been applied to django evolution yet ?

Original comment by t...@alsop-family.com on 31 Jul 2008 at 6:44

GoogleCodeExporter commented 9 years ago
Yes, django-evolution HEAD should work now.  Closing this out.

Original comment by trowb...@gmail.com on 2 Aug 2008 at 8:45