Modify

Opened 14 years ago

Closed 4 years ago

#6196 closed defect (worksforme)

Error when using trac-admin upgrade

Reported by: anonymous Owned by: osimons
Priority: normal Component: FullBlogPlugin
Severity: major Keywords: upgrade patch
Cc: Trac Release: 0.11

Description

I have upgraded my whole web server (apache, pyhthon, sqlite, trac, etc.). After installing the new version for FullBlogPlugin, when running the command: trac-admin /path/to/project upgrade it stopped with a stacktrace error message I have lost (sorry) that was something like this:

(...)
SQL ERROR: INDEX fullblog_comments_time_idx already exists
/usr/lib/python2.6/site-packages/TracFullBlogPlugin-0.1.1-py2.6.egg/tracfullblog/db.py line 70
/usr/lib/python2.6/site-packages/trac/db/sqlite_backend.py line 50
/usr/lib/python2.6/site-packages/trac/db/sqlite_backend.py line 58

I have solved the problem myself changing tracfullblog/db.py's 70th line to

    "CREATE INDEX IF NOT EXISTS fullblog_comments_time_idx ON fullblog_comments (time)")

and 72th line to

    "CREATE INDEX IF NOT EXISTS fullblog_posts_version_time_idx ON fullblog_posts (version_time)")

(the trick was adding IF NOT EXISTS)
I changed the source code that I had downloaded and installed the plugin again with easyinstall -Z -U path/to/my/source/

Attachments (1)

db.py (3.7 KB) - added by anonymous 14 years ago.
Changed file to solve this issue

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by anonymous

Attachment: db.py added

Changed file to solve this issue

comment:1 Changed 14 years ago by Ryan J Ollos

Cc: Ryan J Ollos added; anonymous removed

comment:2 Changed 6 years ago by figaro

Keywords: patch added

comment:3 Changed 4 years ago by Ryan J Ollos

Cc: Ryan J Ollos removed

comment:4 Changed 4 years ago by Ryan J Ollos

Resolution: worksforme
Status: newclosed

This shouldn't be a problem in the 1.4 branch at least.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.