Opened 4 years ago

Closed 4 years ago

Reported by: Owned by: hopfrog@… ejucovy normal MultiRepoSearchPlugin normal environment upgrade 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?

### comment:1 in reply to:  description Changed 4 years ago by ejucovy

Resolution: → fixed new → closed

My guess is that we need extra DB tables to keep the repository index. Where can I find the actual update script to see what happens?

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#L141

It creates two new tables (repository_node and repository_version) and inserts a row into trac's system table to record that the upgrade took place.

but I would like to make sure that there are no additional consequences. Our system is TRAC 0.12.3 and I need to keep it running as such for the time being.

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:

1. Create a new table called "repository_node" with an id integer primary key autoincrement, and text columns repo, filename and contents
2. Create a new table called "repository_version" with an id integer primary key autoincrement, and text columns repo and version
3. 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...

Last edited 4 years ago by Ryan J Ollos (previous) (diff)

### Modify Ticket

Change Properties