Modify

Opened 16 years ago

Closed 15 years ago

#3336 closed defect (duplicate)

Don't upgrade database after worklog installation

Reported by: Ali Nebi Owned by: Colin Guthrie
Priority: normal Component: WorkLogPlugin
Severity: major Keywords:
Cc: slava@… Trac Release: 0.11

Description

I installed the last source version of worklog and i did check out of the last version of Genshi.

I started python setup.py install and started trac-admin /var/project/path upgrade --no-backup

After this i get upgrading done. But it looks that database is no upgraded. In browser i get message that i must upgrade project then restart apache. I do all these, but the same result.

When i run several time trac-admin ... i get the same message that database need to be upgraded and then successful upgrade.

Attachments (0)

Change History (10)

comment:1 Changed 16 years ago by anebi

When i create work_log table manually in postgresql (v1), then i can upgrade successfull. But in any case it will be good if this will happen autmatically when we do trac-admin upgrade...

comment:2 Changed 15 years ago by Colin Guthrie

Status: newassigned

Hmm, this is really strange. Did you have a previous version of worklog installed? Can you try with a fresh trac env for me with PG? I don't have a handy PG installed, but I can say that testing it with sqlite and mysql it works OK for me.

comment:3 Changed 15 years ago by anonymous

Same here, because:

2009-01-04 11:06:18,575 Trac[api] ERROR: WorklogPlugin Exception: current transaction is aborted, commands ignored until end of transaction block
}}{}

comment:4 Changed 15 years ago by slava@…

Hello

I am also experiencing this issue. It works fine in a fresh environment but not our existing one. I have tried adding the table manually as anebi suggested, but it still does not upgrade. It does try to go a little bit further along though. Here is the result of the upgrade after I create the table manually.

Worklog needs an upgrade
Upgrading Database
Updating work_log table (v2)
Updating work_log table (v3)
Done upgrading Worklog
Upgrade done.

This keeps repeating after every consequent upgrade attempt. I get this error in the trac log when I try the upgrade

Trac[api] ERROR: WorklogPlugin Exception: column "ticket" does not exist

Any solution for this? Is there anything else I can do manually to get past this point? If it's just a matter of creating the write database tables/columns, can you point me to the database script? I would really like to have this plugin for our Trac.

Thank you

Slava

comment:5 Changed 15 years ago by slava@…

I worked around this by creating the columns in the work_log table manually. Just for others reference, the 4 tables are listed below.

   Column   |  Type   | Modifiers
------------+---------+-----------
 ticket     | integer |
 lastchange | integer |
 starttime  | integer |
 endtime    | integer |

Thanks for the cool plug in, asides from the installation issues it works pretty good :)

comment:6 Changed 15 years ago by Tobias

Cc: slava@… added; anonymous removed

Hi slava, can you drop a few lines how you did that?

comment:7 in reply to:  6 Changed 15 years ago by slava@…

Replying to Tobias:

Hi slava, can you drop a few lines how you did that?

Hey Tobias. You mean how I created the table and columns? Look up the postgresql commands, I can't remember them off hand. If you're still having problems, ping me on irc, I'm in the trac channel. My nickname is somethingelse

comment:8 Changed 15 years ago by Tobias

Hi slava, thanks for the reply and your offer to give me a hand. I had a look at api.py. It seems that the data base isn't really created.

sqlite
.tables

doesn't include the work_log table.

Anyway, I was fighting with sqlite for a bit and decided to migrate everything to mysql. Probably not the smartest move, but everything works fine with mysql as data base backend.

comment:9 Changed 15 years ago by anonymous

Hi Tobias

I was actually having the problem with PostgreSQL, not sqlite. So was Ali as far as I can tell... Glad you got it working with MySQL; I still haven't dared to try trac with MySQL :)

comment:10 Changed 15 years ago by Colin Guthrie

Resolution: duplicate
Status: assignedclosed

Hi everyone and sorry for the really long delay :s

I think this is actually a dupe of #4356 (or the other way round etc.). I've applied the fix available there which the user claims works with Postgres. I generally only test on MySQL/Sqlite (depends how lazy I feel) so apologies to the PGers out there for this breakage.

If this still has problems please comment on this or the other bug.

Modify Ticket

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