Modify ↓
#11424 closed task (fixed)
What does "trac-admin upgrade" actually change here?
Reported by: | Owned by: | ejucovy | |
---|---|---|---|
Priority: | normal | Component: | MultiRepoSearchPlugin |
Severity: | normal | Keywords: | environment upgrade |
Cc: | Trac Release: | 0.12 |
Description
This may be a dumb question, but I don't understand the full impact of running trac-admin path/to/env upgrade as part of this install. Our system is TRAC 0.12.3 and I need to keep it running as such for the time being.
My guess is that we need extra DB tables to keep the repository index, but I would like to make sure that there are no additional consequences.
Where can I find the actual update script to see what happens?
Attachments (0)
Note: See
TracTickets for help on using
tickets.
Replying to hopfrog@…:
Yes, that's correct. The update script is organized into several functions in the
sqlindexer.py
module, but the major portion is here: https://github.com/boldprogressives/trac-MultiRepoSearchPlugin/blob/master/multireposearch/sqlindexer.py#L141It creates two new tables (
repository_node
andrepository_version
) and inserts a row into trac'ssystem
table to record that the upgrade took place.I can't guarantee that running
trac-admin path/to/env upgrade
will have no additional consequences -- that command will allow all of your installed plugins, and trac itself, to upgrade themselves in whatever way(s) they currently want to.Note that this doesn't mean code upgrades -- but potentially includes database migrations, trac.ini config changes, and/or filesystem modifications of your trac environment.
If you want to be extremely cautious, you can do the upgrade work for this plugin yourself. Connect directly to your database and:
id integer primary key autoincrement
, and text columnsrepo
,filename
andcontents
id integer primary key autoincrement
, and text columnsrepo
andversion
insert into system (name, value) values ('multireposearch.sqlindexer.db_version', '1');
After you've run those three commands, you should be all set up, and won't need to run
trac-admin upgrade
.But no matter what, make sure to back up your database and environment first, just in case...