Opened 9 years ago
Closed 9 years ago
#12784 closed defect (fixed)
PeerReview: running upgrade db2 - Failed
Reported by: | Owned by: | Cinc-th | |
---|---|---|---|
Priority: | high | Component: | PeerReviewPlugin |
Severity: | major | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
My trac server specs:
Trac 1.0.1
Python 2.7.3 (default, Feb 27 2014, 20:09:21) [GCC 4.6.3]
MySQL server: "5.5.40-0ubuntu0.12.04.1", client: "5.5.47"
Installed PeerReviewPlugin, when Trac states "TracError: The Trac Environment needs to be upgraded." I run "trac-admin /var/www/path to trac env/zyx upgrade"
I get:
PeerReview: running upgrade db2
The upgrade failed. Please fix the issue and try again.
OperationalError: (1050, "Table 'peer_review' already exists")
Dropping the said table, re-run upgrade, I get:
PeerReview: running upgrade db2
The upgrade failed. Please fix the issue and try again.
TypeError: 'NoneType' object has no attribute 'getitem'
Re-run upgrade again, I get:
PeerReview: running upgrade db2
The upgrade failed. Please fix the issue and try again.
OperationalError: (1050, "Table 'peer_review' already exists")
Basically, an infinite loop from here.. Please advice. Thanks!
Attachments (0)
Change History (12)
comment:1 follow-up: 3 Changed 9 years ago by
comment:2 Changed 9 years ago by
Thanks for the quick reply. I recovered old db, removed the plugin, installed trunk version of plugin, got to the trac upgrade env command and got:
The upgrade failed. Please fix the issue and try again.
TracError: Upgrade for database version 1 not supported. Raise a ticket for PeerReviewPlugin for a fix
comment:3 Changed 9 years ago by
Replying to Cinc-th:
Use the current trunk version of the plugin.
Before running the upgrade make sure you don't have broken tables left from you attempts. Best bet is to use your backup copy.
I recovered old db, so no broken tables, removed the old plugin, installed trunk version of plugin, got to the trac upgrade env command and got:
The upgrade failed. Please fix the issue and try again. TracError: Upgrade for database version 1 not supported. Raise a ticket for PeerReviewPlugin for a fix
comment:4 follow-up: 5 Changed 9 years ago by
That looks more like it. I don't suppose you have such an old version of PeerReviewPlugin preinstalled.
You have to remove the entry codereview_version
from the system data base table. It shouldn't be there if it's clean install.
If that one is from another plugin drop me a note. It means there is a name clash which should be accounted for in the upgrade process.
comment:5 Changed 9 years ago by
Replying to Cinc-th:
That looks more like it. I don't suppose you have such an old version of PeerReviewPlugin preinstalled.
You have to remove the entry
codereview_version
from the system data base table. It shouldn't be there if it's clean install.If that one is from another plugin drop me a note. It means there is a name clash which should be accounted for in the upgrade process.
I removed a similar name "coderev" from System db, re-ran the Trac env upgrade and worked! Thanks a bunch Cinc-th! Much appreciated :)
comment:6 follow-up: 7 Changed 9 years ago by
You're welcome. I suppose the entry is from another plugin?
comment:7 follow-ups: 8 9 Changed 9 years ago by
Replying to Cinc-th:
You're welcome. I suppose the entry is from another plugin?
I did previously try this plugin: CodeReviewPlugin , but no success, then I tried PeerReview plugin, and saw the above errors.
PeerReview plugin is working on my test Trac environment. Time to deploy to the production Tracs.
Thanks again!
comment:8 Changed 9 years ago by
Replying to charles.carbaj@…:
I did previously try this plugin: CodeReviewPlugin , but no success, then I tried PeerReview plugin, and saw the above errors.
CodeReviewPlugin hasn't been maintained in quite a while, so I'm not surprised you encountered issue. PeerReviewPlugin and CodeReviewerPlugin appear to be the only code review tools that are maintained.
comment:9 follow-up: 10 Changed 9 years ago by
Replying to charles.carbaj@…:
Replying to Cinc-th:
You're welcome. I suppose the entry is from another plugin?
I did previously try this plugin: CodeReviewPlugin , but no success, then I tried PeerReview plugin, and saw the above errors.
I see.
PeerReview plugin is working on my test Trac environment. Time to deploy to the production Tracs. Thanks again!
Be aware that the plugin currently only works with the default repository. And there may be quite a few rough edges...
comment:10 Changed 9 years ago by
Replying to Cinc-th:
Be aware that the plugin currently only works with the default repository. And there may be quite a few rough edges...
Oh, Ok, noted. I will update this ticket once I get around to deploying for our other tracs. Possibly in a week. Thanks.
comment:11 Changed 9 years ago by
Forgot to reference this ticket in changeset [15557] so here comes the information.
In [15557] a new upgrade mechanism was introduced:
- Create database tables directly for first time installs instead of performing each upgrade step. This fails for backends other than SQLite.
- don't try to upgrade ancient versions of the plugin. If you use such a version create a support ticket.
This should fix the database upgrade problems for new users. I don't think there are any users of old releases left after all these years.
Use the current trunk version of the plugin.
Before running the upgrade make sure you don't have broken tables left from you attempts. Best bet is to use your backup copy.