Modify

Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#11424 closed task (fixed)

What does "trac-admin upgrade" actually change here?

Reported by: hopfrog@… 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)

Change History (1)

comment:1 in reply to: ↑ description Changed 11 months ago by ejucovy

  • Resolution set to fixed
  • Status changed from new to closed

Replying to hopfrog@…:

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 11 months ago by rjollos (previous) (diff)

Add Comment

Modify Ticket

Action
as closed The owner will remain ejucovy.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.