Modify ↓
#7383 closed defect (fixed)
trac-admin $ENV ticket_changesets commands fail w/ Trac 0.12
Reported by: | Owned by: | Mikael Relbe | |
---|---|---|---|
Priority: | normal | Component: | TracTicketChangesetsPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description
When running any of the trac-admin $ENV ticket_changesets commands, the results are always:
trac-admin $ENV ticket_changesets diff diff ticket commit messages to be reformatted OperationalError: (1054, "Unknown column 'rowid' in 'field list'")
The column 'rowid' is no longer present in the ticket_change table. The patch below is a suggested fix:
diff admin.py.orig admin.py 195c195 < cursor.execute('SELECT rowid,ticket,oldvalue,newvalue ' --- > cursor.execute('SELECT ticket,time,oldvalue,newvalue ' 198c198 < rowid, ticket, oldvalue, oldmessage = row --- > ticket, time, oldvalue, oldmessage = row 210,211c210,211 < 'SET newvalue=%s WHERE rowid=%s', < [newmessage, rowid]) --- > 'SET newvalue=%s WHERE ticket=%d AND time=%d', > [newmessage, ticket, time]) 213c213 < printout('@@ comment:%s:ticket:%s (db rowid %s) @@' --- > printout('@@ comment:%s:ticket:%d (db time %d) @@'
Attachments (0)
Change History (5)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
This patch is a better one to use. The previous one made some incorrect assumptions in line 210, and wouldn't work. This one includes the amendment I added, and has been tested.
Cheers.
195c195 < cursor.execute('SELECT rowid,ticket,oldvalue,newvalue ' --- > cursor.execute('SELECT ticket,time,oldvalue,newvalue ' 198c198 < rowid, ticket, oldvalue, oldmessage = row --- > ticket, time, oldvalue, oldmessage = row 210,211c210,211 < 'SET newvalue=%s WHERE rowid=%s', < [newmessage, rowid]) --- > 'SET newvalue=%s WHERE ticket=%s and time=%s', > [newmessage, ticket, time]) 213,214c213,214 < printout('@@ comment:%s:ticket:%s (db rowid %s) @@' < % (oldvalue, ticket, rowid)) --- > printout('@@ comment:%s:ticket:%d (db time %d) @@' > % (oldvalue, ticket, time))
comment:3 Changed 14 years ago by
Hi,
I just got the code from subversion, still with this bug.
http://trac-hacks.org/svn/tracticketchangesetsplugin/trunk/
When will this patch get in the code?
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
The patch listed is missing an extra change for line 214.
214c214 < % (oldvalue, ticket, rowid)) ---