2186: Upgrading site on 1.6 RC2 gives evolution errors
- Fixed
- Review Board
chris.a.********@gmai***** (Google Code) (Is this you? Claim this profile.) | |
|
|
Aug. 28, 2011 |
What version are you running? 1.6 RC 2 What's the URL of the page containing the problem? What steps will reproduce the problem? 1. Upgrade ReviewBoard install from 1.6 RC 1 to 1.6 RC2 2. Upgrade existing site with reviews, repos, etc using "rb-site upgrade". 3. Receive the following errors: Rebuilding directory structure Updating database. This may take a while. Creating tables ... There are unapplied evolutions for diffviewer. Project signature has changed - an evolution is required Installing custom SQL ... Installing indexes ... No fixtures found. The stored evolutions do not completely resolve all model changes. Run `./manage.py evolve --hint` to see a suggestion for the changes required. The following are the changes that could not be resolved: In model reviews.ReviewRequest: Field 'inactive_file_attachments' has been added Field 'file_attachments' has been added In model reviews.Review: Field 'file_attachment_comments' has been added In model reviews.ReviewRequestDraft: Field 'inactive_file_attachments' has been added Field 'file_attachments' has been added In model accounts.Profile: Field 'is_private' has been added In model sessions.Session: In field 'expire_date': Property 'db_index' has changed Error: Your models contain changes that Django Evolution cannot resolve automatically. What is the expected output? What do you see instead? What operating system are you using? What browser? Please provide any additional information below.
What version did you start with? Was 1.6 RC1 the first installed version in that database? What database are you using? Can you run the following and provide the output: rb-site manage /path/to/site evolve -- --hint
-
+ NeedInfo -
- Type-Defect + Type-Support -
+ chipx86
I've been using reviewBoard with this site for a number of versions, since at least 1.1 (possibly even 1.0?). Using MySQL, Server version: 5.0.51a-3ubuntu5.4 (Ubuntu) Output of rb-site manage evolve --hint: #----- Evolution for sessions from django_evolution.mutations import * from django.db import models MUTATIONS = [ ChangeField('Session', 'expire_date', initial=None, db_index=True) ] #---------------------- #----- Evolution for accounts from django_evolution.mutations import * from django.db import models MUTATIONS = [ AddField('Profile', 'is_private', models.BooleanField, initial=False) ] #---------------------- #----- Evolution for reviews from django_evolution.mutations import * from django.db import models MUTATIONS = [ AddField('ReviewRequest', 'inactive_file_attachments', models.ManyToManyField, related_model='attachments.FileAttachment'), AddField('ReviewRequest', 'file_attachments', models.ManyToManyField, related_model='attachments.FileAttachment'), AddField('Review', 'file_attachment_comments', models.ManyToManyField, related_model='reviews.FileAttachmentComment'), AddField('ReviewRequestDraft', 'inactive_file_attachments', models.ManyToManyField, related_model='attachments.FileAttachment'), AddField('ReviewRequestDraft', 'file_attachments', models.ManyToManyField, related_model='attachments.FileAttachment') ] #---------------------- Trial evolution successful. Run './manage.py evolve --hint --execute' to apply evolution.
Okay, can you also provide the following: 1) A dump of the database schema (use mysqldump -d) 2) A screenshot of your Django Evolution Versions and Evolutions entry listings in the admin UI -> Database. 3) Verify you're running the newest Django by doing the following from the console: $ python >>> import django >>> print django.VERSION And showing what that says.
Since other people are hitting this, it's possible there's a root cause somewhere we haven't identified. Can you also provide the Python version?
-
- Type-Support + Type-Defect + Milestone-Release1.6
I have spent a considerable amount of time on this and can't find anything on our end that could cause it. I have a new script that can simulate all kinds of database upgrades, with various combinations of versions and database types and it never hit this. So I'm a bit stuck. Having the latest requested info would help a lot.
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import django >>> print django.VERSION (1, 3, 0, 'final', 0) The screenshots and schema are attached.
-
+ + +
Two more bits of info: 1) Can you dump the contents of the django_project_version and django_evolution tables? 2) To the best of your ability, can you tell me exactly what versions you've used with this database over the course of its existence? Mostly interested in 1.5/1.6 timelines, but any info helps for me to simulate this.
Attached are the dumps of those tables. It's a best guess, but I've probably used every version of 1.5 since beta 2, and have used 1.6 RC2 on this install.
-
+ +
Thanks. I suspect if you upgrade to the latest Django-Evolution and the latest RB 1.6 nightly, the problem will go away. Would you mind trying that?
Attached are the dumps of those tables. It's a best guess, but I've probably used every version of 1.5 since beta 2, and have used 1.6 RC2 on this install.
-
+ +
I believe this is now fixed. If you get a new version of Django Evolution and a Review Board nightly, it will hopefully fix itself, but if not, at least it'll prevent it from happening again... Mind trying?