Best practice for conversion of plugin db schema code

Skip to first unread message

Steffen Hoffmann

Oct 3, 2012, 4:30:10 PM10/3/12
Hash: SHA1

Dear developers,

I've been transforming TagsPlugin's old, not versioned db schema to
adapt to the preferred Trac-style system with version entries in system
db table and incremental upgrade modules.

This way it's possible to overcome version tests, that rely on raising
an exception by querying for existence of certain some db table. This is
not only an ugly hack, but repeatedly proofed to break upgrades to
Trac-1.0 as well [1][2].

Now, Jun Omae came up with a patch [3] to aim at finally obsoleting
these kind of db table existence tests for all supported database
backends by db backend-specific code for querying the db table catalog

It is a quest for best-practice regarding this particular issue, and a
good number of other plugins could profit from the result as well, but
still unfinished yet.

Anyone else up to join in for completing the task? I think, that we're
already close to a good solution.

Thanks for your consideration.

Steffen Hoffmann

Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


Roberto Longobardi

Oct 15, 2012, 5:21:55 AM10/15/12
Hi Steffen,
I used your approach (among other things) in my effort to make the Test Manager plugin compatible with Trac 1.0.

I have updated the set of utility functions that help plugin developers (like myself :D) cope with db upgrades.

This code, as well as the TracGenericClass [1] plugin itself, may be useful to other developers needing to implement a robust upgrade mechanism. BTW, this plugin offers a completely declarative approach to build persistence objects into Trac.

If anyone wishes to take a look at the code, the relevant changes to TracGenericClass are here [2], and the code in Test Manager using them is here [3].

Your function has been added here [4].

I released just yesterday the Trac 1.0-compatible stuff [5].

Thanks, ciao.

You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply all
Reply to author
0 new messages