Modify

Opened 5 years ago

Last modified 5 years ago

#6196 new defect

Error when using trac-admin upgrade

Reported by: anonymous Owned by: osimons
Priority: normal Component: FullBlogPlugin
Severity: major Keywords: upgrade
Cc: rjollos 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 5 years ago.
Changed file to solve this issue

Download all attachments as: .zip

Change History (2)

Changed 5 years ago by anonymous

Changed file to solve this issue

comment:1 Changed 5 years ago by rjollos

  • Cc rjollos added

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.