Modify ↓
Opened 17 years ago
Closed 16 years ago
#4931 closed defect (fixed)
[PATCH] upgrade fail for new installation
| Reported by: | uray | Owned by: | Richard Liao |
|---|---|---|---|
| Priority: | highest | Component: | TracTicketTemplatePlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 0.11 |
Description
error message
Migrate from template files to db.
Done.
Add table tt_custom.
Traceback (most recent call last):
File "/usr/bin/trac-admin", line 8, in <module>
load_entry_point('Trac==0.11.1', 'console_scripts', 'trac-admin')()
File "/usr/lib/python2.5/site-packages/trac/admin/console.py", line 1295, in run
return admin.onecmd(command)
File "/usr/lib/python2.5/site-packages/trac/admin/console.py", line 123, in onecmd
rv = cmd.Cmd.onecmd(self, line) or 0
File "/usr/lib/python2.5/cmd.py", line 219, in onecmd
return func(arg)
File "/usr/lib/python2.5/site-packages/trac/admin/console.py", line 1145, in do_upgrade
self.__env.upgrade(backup=do_backup)
File "/usr/lib/python2.5/site-packages/trac/env.py", line 442, in upgrade
participant.upgrade_environment(db)
File "build/bdist.linux-i686/egg/tickettemplate/ttadmin.py", line 103, in upgrade_environment
File "build/bdist.linux-i686/egg/tickettemplate/upgrades.py", line 178, in add_tt_custom
File "/usr/lib/python2.5/site-packages/trac/db/util.py", line 51, in execute
return self.cursor.execute(sql)
File "/usr/lib/python2.5/site-packages/trac/db/sqlite_backend.py", line 58, in execute
args or [])
File "/usr/lib/python2.5/site-packages/trac/db/sqlite_backend.py", line 50, in _rollback_on_error
return function(self, *args, **kwargs)
pysqlite2.dbapi2.OperationalError: table tt_custom already exists
solution
--- tractickettemplateplugin.orig/0.11/tickettemplate/ttadmin.py 2008-10-13 07:24:16.000000000 +0800
+++ tractickettemplateplugin/0.11/tickettemplate/ttadmin.py 2009-04-16 21:05:02.000000000 +0800
@@ -91,7 +91,7 @@
row = cursor.fetchone()
if not row:
self.environment_created()
- current_version = 0
+ current_version = schema_version
else:
current_version = int(row[0])
Attachments (0)
Change History (4)
comment:1 Changed 16 years ago by
| Priority: | normal → highest |
|---|
comment:2 Changed 16 years ago by
| Summary: | upgrade fail for new installation → [PATCH] upgrade fail for new installation |
|---|
comment:3 Changed 16 years ago by
I didn't see this issue when installing under Python 2.6, SQLite, and Trac 0.12dev-r9098.
comment:4 Changed 16 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Version 0.7 has fixed this bug.
Note: See
TracTickets for help on using
tickets.



Thanks. This fix works.
I've upgraded the priority because currently this affects all new installs. So when you checkout the plugin, it is broken.