Hi,

I'm in the same position as this former post and need some advice. 

https://groups.google.com/forum/#!topic/reviewboard/9-v3mHJz0Ek


My upgrade stalled halfway through the upgrade because of an invalid 
installation of a dependency. As I found that out by killing the upgrade 
and then using: rb-site manage /path/to/site list-evolutions
I fixed the dependency issue, but now the database is corrupted.


*upgrade command log:*
*********************************

rb-site upgrade /var/www/reviews
Rebuilding directory structure
Updating database. This may take a while.

The log output below, including warnings and errors,
can be ignored unless upgrade fails.

------------------ <begin log output> ------------------
Creating tables ...
There are unapplied evolutions for auth.
There are unapplied evolutions for contenttypes.
There are unapplied evolutions for accounts.
There are unapplied evolutions for attachments.
There are unapplied evolutions for changedescs.
There are unapplied evolutions for diffviewer.
There are unapplied evolutions for hostingsvcs.
There are unapplied evolutions for reviews.
There are unapplied evolutions for scmtools.
There are unapplied evolutions for site.
Project signature has changed - an evolution is required
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
CommandError: Error applying evolution: (1060, "Duplicate column name 
'permissions'")


******************

Unfortunately I didn't backup the mysql database correctly before the 
upgrade and now have to move forward with the database in its current 
state. My other option is a restore from a backup 2 weeks ago however I 
lose all of the reviews that occurred since. I'm fingers crossed that the 
database is salvageable as the upgrade stalled early in the process.



*More logs:Evolve --hints:*
 rb-site manage /var/www/reviews evolve -- --hint
#----- Evolution for auth
from django_evolution.mutations import ChangeMeta


MUTATIONS = [
    ChangeMeta('Permission', 'unique_together', ((u'content_type', 
u'codename'),))
]
#----------------------
#----- Evolution for contenttypes
from django_evolution.mutations import ChangeMeta


MUTATIONS = [
    ChangeMeta('ContentType', 'unique_together', (('app_label', 'model'),))
]
#----------------------
#----- Evolution for accounts
from django_evolution.mutations import AddField, ChangeMeta, DeleteField
from django.db import models
from djblets.db.fields import JSONField


MUTATIONS = [
    AddField('Profile', 'default_use_rich_text', models.NullBooleanField, 
null=True),
    AddField('Profile', 'should_send_email', models.BooleanField, 
initial=True),
    AddField('Profile', 'show_closed', models.BooleanField, initial=True),
    AddField('Profile', 'should_send_own_updates', models.BooleanField, 
initial=True),
    DeleteField('Profile', 'show_submitted'),
    ChangeMeta('ReviewRequestVisit', 'unique_together', ((u'user', 
u'review_request'),)),
    AddField('LocalSiteProfile', 'permissions', JSONField, null=True),
    ChangeMeta('LocalSiteProfile', 'unique_together', ((u'user', 
u'local_site'), (u'profile', u'local_site')))
]
#----------------------
#----- Evolution for attachments
from django_evolution.mutations import AddField, ChangeField
from django.db import models


MUTATIONS = [
    AddField('FileAttachment', 'orig_filename', models.CharField, 
max_length=256, null=True),
    AddField('FileAttachment', 'added_in_filediff', models.ForeignKey, 
null=True, related_model='diffviewer.FileDiff'),
    AddField('FileAttachment', 'repository', models.ForeignKey, null=True, 
related_model='scmtools.Repository'),
    AddField('FileAttachment', 'repo_revision', models.CharField, 
max_length=64, null=True, db_index=True),
    AddField('FileAttachment', 'repo_path', models.CharField, 
max_length=1024, null=True),
    ChangeField('FileAttachment', 'file', initial=None, max_length=512)
]
#----------------------
#----- Evolution for changedescs
from django_evolution.mutations import AddField
from django.db import models


MUTATIONS = [
    AddField('ChangeDescription', 'rich_text', models.BooleanField, 
initial=False)
]
#----------------------
#----- Evolution for diffviewer
from django_evolution.mutations import AddField
from django.db import models
from djblets.db.fields import JSONField


MUTATIONS = [
    AddField('DiffSet', 'base_commit_id', models.CharField, max_length=64, 
null=True, db_index=True),
    AddField('DiffSet', 'extra_data', JSONField, null=True),
    AddField('FileDiffData', 'extra_data', JSONField, null=True),
    AddField('DiffSetHistory', 'extra_data', JSONField, null=True),
    AddField('FileDiff', 'extra_data', JSONField, null=True)
]
#----------------------
#----- Evolution for hostingsvcs
from django_evolution.mutations import ChangeMeta


MUTATIONS = [
    ChangeMeta('HostingServiceAccount', 'unique_together', [])
]
#----------------------
#----- Evolution for reviews
from django_evolution.mutations import AddField, ChangeField, ChangeMeta
from django.db import models
from djblets.db.fields import CounterField
from djblets.db.fields import JSONField


MUTATIONS = [
    AddField('Comment', 'rich_text', models.BooleanField, initial=False),
    AddField('Comment', 'extra_data', JSONField, null=True),
    AddField('Group', 'extra_data', JSONField, null=True),
    ChangeField('Group', 'mailing_list', initial=None, max_length=254),
    ChangeMeta('Group', 'unique_together', ((u'name', u'local_site'),)),
    AddField('FileAttachmentComment', 'diff_against_file_attachment', 
models.ForeignKey, null=True, related_model='attachments.FileAttachment'),
    AddField('FileAttachmentComment', 'rich_text', models.BooleanField, 
initial=False),
    AddField('Review', 'body_top_rich_text', models.BooleanField, 
initial=False),
    AddField('Review', 'body_bottom_rich_text', models.BooleanField, 
initial=False),
    AddField('Review', 'rich_text', models.BooleanField, initial=False),
    AddField('Review', 'extra_data', JSONField, null=True),
    AddField('ReviewRequestDraft', 'description_rich_text', 
models.BooleanField, initial=False),
    AddField('ReviewRequestDraft', 'extra_data', JSONField, null=True),
    AddField('ReviewRequestDraft', 'rich_text', models.BooleanField, 
initial=False),
    AddField('ReviewRequestDraft', 'commit_id', models.CharField, 
max_length=64, null=True, db_index=True),
    AddField('ReviewRequestDraft', 'testing_done_rich_text', 
models.BooleanField, initial=False),
    AddField('ReviewRequest', 'issue_dropped_count', CounterField, 
null=True),
    AddField('ReviewRequest', 'description_rich_text', models.BooleanField, 
initial=False),
    AddField('ReviewRequest', 'extra_data', JSONField, null=True),
    AddField('ReviewRequest', 'commit_id', models.CharField, max_length=64, 
null=True, db_index=True),
    AddField('ReviewRequest', 'issue_resolved_count', CounterField, 
null=True),
    AddField('ReviewRequest', 'issue_open_count', CounterField, null=True),
    AddField('ReviewRequest', 'testing_done_rich_text', 
models.BooleanField, initial=False),
    AddField('ReviewRequest', 'rich_text', models.BooleanField, 
initial=False),
    ChangeMeta('ReviewRequest', 'unique_together', ((u'commit_id', 
u'repository'), (u'changenum', u'repository'), (u'local_site', 
u'local_id'))),
    AddField('ScreenshotComment', 'rich_text', models.BooleanField, 
initial=False),
    AddField('ScreenshotComment', 'extra_data', JSONField, null=True)
]
#----------------------
#----- Evolution for scmtools
from django_evolution.mutations import AddField, ChangeMeta, DeleteField
from django.db import models


MUTATIONS = [
    AddField('Repository', 'encrypted_password', models.CharField, 
initial=u'', max_length=128, db_column=u'password'),
    AddField('Repository', 'archived_timestamp', models.DateTimeField, 
null=True),
    AddField('Repository', 'archived', models.BooleanField, initial=False),
    AddField('Repository', 'hooks_uuid', models.CharField, max_length=32, 
null=True),
    DeleteField('Repository', 'password'),
    ChangeMeta('Repository', 'unique_together', ((u'name', u'local_site'), 
(u'archived_timestamp', u'path', u'local_site'), (u'hooks_uuid', 
u'local_site')))
]
#----------------------
#----- Evolution for site
from django_evolution.mutations import AddField
from django.db import models


MUTATIONS = [
    AddField('LocalSite', 'public', models.BooleanField, initial=False)
]
#----------------------
Trial evolution successful.


***************************************************************************************************************
*list-evolutions*

rb-site manage /var/www/reviews list-evolutions
Applied evolutions for 'auth':
    auth_delete_message

Applied evolutions for 'sessions':
    session_expire_date_db_index

Applied evolutions for 'accounts':
    is_private
    timezone
    open_an_issue
    extra_data
    timezone_length_30

Applied evolutions for 'changedescs':
    fields_changed_longtext

Applied evolutions for 'diffviewer':
    add_parent_diffs
    filediff_filenames_1024_chars
    diffset_basedir
    filediff_status
    add_diff_hash
    diffsethistory_diff_updated

Applied evolutions for 'hostingsvcs':
    account_hosting_url
    account_hosting_url_max_length_255

Applied evolutions for 'reviews':
    change_descriptions
    last_review_timestamp
    shipit_count
    default_reviewer_repositories
    null_repository
    localsite
    group_incoming_request_count
    group_invite_only
    group_visible
    default_reviewer_local_site
    add_issues_to_comments
    file_attachments
    file_attachment_comment_extra_data
    review_request_last_review_activity_timestamp
    review_request_depends_on

Applied evolutions for 'scmtools':
    bugzilla_url_charfield
    repository_raw_file_url
    repository_visible
    repository_path_length_255
    repository_path_length_255
    localsite
    repository_access_control
    group_site
    repository_hosting_accounts
    repository_extra_data_null


****************************************************************
****************************************************************
****************************************************************


I tried dropping the column permissions and trying again, but then got this 
error and didn't know where to go from here

"Error applying evolution: (1054, "Unknown column 'show_submitted' in 
'accounts_profile'")"


I've now got a backup of the mysql database in this corrupt state, so I'm 
ready to correct the database if someone can help me through it.


or any other ideas?

Regards,
Adam Driscoll




-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to