There is a IEnvironmentSetupParticipant extension point that you can use for this - it does exactly what you want. 3 methods that allow you to run code to check for/indicate status and do necessary updates to the data model.
See first item in list of extension points: http://projects.edgewall.com/trac/wiki/TracDev/PluginDevelopment :::simon --- [email protected] wrote: Hi, > > my darcs plugin needs to augment the revision table with the exact > "hash" string that darcs uses to unique identification of any patch. > > As this is currently the only mandatory one-line-patch that needs to be > applied to pristine trac, I'm looking around for a workaround. > > One brute-force option would be some sort of > > try: > access-the-hash-field-present-in-revision-table() > except: > alter-table-revision-add-hash-column() > adjust-the-default-schema() > > done at plugin load time. > > A cleaner approach would be of making the admin script (actually, the > Environment and DatabaseManager classes) to load the plugin and give it > a chance of saying something on the matter. I'm still searching a good > solution for the "adjust-the-default-schema()" step, though. > > What do you think? > > ciao, lele. > _______________________________________________ > Trac-dev mailing list > [email protected] > http://lists.edgewall.com/mailman/listinfo/trac-dev > _______________________________________________ Trac-dev mailing list [email protected] http://lists.edgewall.com/mailman/listinfo/trac-dev
