Ticket #3336 (closed defect: duplicate)

Opened 5 years ago

Last modified 4 years ago

Don't upgrade database after worklog installation

Reported by: Ali Nebi Assigned to: coling
Priority: normal Component: WorkLogPlugin
Severity: major Keywords:
Cc: slava@clarontech.com 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

Change History

07/16/08 19:54:28 changed 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...

12/17/08 00:32:57 changed by coling

  • status changed from new to assigned.

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.

01/04/09 05:59:32 changed 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
}}{}

05/20/09 18:25:29 changed by slava@clarontech.com

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

05/20/09 19:22:26 changed by slava@clarontech.com

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 :)

(follow-up: ↓ 7 ) 06/19/09 14:52:20 changed by Tobias

  • cc set to slava@clarontech.com.

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

(in reply to: ↑ 6 ) 06/19/09 15:08:35 changed by slava@clarontech.com

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

06/20/09 01:05:19 changed 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.

06/20/09 01:19:07 changed 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 :)

09/02/09 11:38:54 changed by coling

  • status changed from assigned to closed.
  • resolution set to duplicate.

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.


Add/Change #3336 (Don't upgrade database after worklog installation)




Change Properties
Action