Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#2077 closed defect (wontfix)

Trac environment upgrade fails using MySQL

Reported by: jluna Owned by: Noah Kantrowitz
Priority: high Component: TracForgePlugin
Severity: major Keywords: mysql schema upgrade database
Cc: Trac Release: 0.10

Description

When [re-]creating the TracForge tables, MySQL drops out with:

Incorrect table definition; there can be only one auto column and it must be defined as a key

Anyhow, it's an easy fix. The annoying part is that it leaves the database in a half-updated state. Perhaps upgrade_environment should be wrapped in a generic try-except block to perform a database rollback in the event of an error?

Attachments (0)

Change History (5)

comment:1 in reply to:  description ; Changed 17 years ago by Paul.Thomson@…

Replying to jluna:

When [re-]creating the TracForge tables, MySQL drops out with:

Incorrect table definition; there can be only one auto column and it must be defined as a key

Anyhow, it's an easy fix. The annoying part is that it leaves the database in a half-updated state. Perhaps upgrade_environment should be wrapped in a generic try-except block to perform a database rollback in the event of an error?

comment:2 in reply to:  1 Changed 17 years ago by anonymous

I am having the same problem - could you please let me know your fix?

Many thanks,

Paul

comment:3 Changed 17 years ago by Noah Kantrowitz

Resolution: wontfix
Status: newclosed

I do not test on MySQL, nor do I plan to, so consider this even more unsupported than normal.

comment:4 Changed 17 years ago by anonymous

Yeah, thanks for that. Big help for those of us who choose to use MySQL for various legitimate reasons.

comment:5 Changed 17 years ago by anonymous

FIX IS SIMPLE:

--- tracforge/admin/db_default.py.orig  2007-12-27 12:00:17.000000000 -0800
+++ tracforge/admin/db_default.py       2007-12-27 12:00:26.000000000 -0800
@@ -7,7 +7,7 @@
         Column('name'),
         Column('env_path'),
     ],
-    Table('tracforge_project_log', key=('project', 'action'))[
+    Table('tracforge_project_log', key=('project', 'action', 'id'))[
         Column('id', auto_increment=True),
         Column('project'),
         Column('action'),

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Noah Kantrowitz.
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.