Edgewall Software

Changes between Version 13 and Version 14 of TracUpgrade


Ignore:
Timestamp:
Aug 27, 2005, 9:46:59 PM (19 years ago)
Author:
Christopher Lenz
Comment:

Added upgrade instructions for 0.9

Legend:

Unmodified
Added
Removed
Modified
  • TracUpgrade

    v13 v14  
    22[[TracGuideToc]]
    33
    4 Trac environments sometimes need to be upgraded before they can be used
    5 in a new version of Trac. This document describes the steps necessary
    6 to upgrade an environment.
     4A Trac environment sometimes needs to be upgraded before it can be used with a new version of Trac. This document describes the steps necessary to upgrade an environment.
    75
    86 '''Note''': ''Environment upgrades are not necessary for minor version releases unless otherwise noted. For example, there's no need to upgrade a Trac environment created with (or upgraded) 0.8.0 when installing 0.8.4 (or any other 0.8.x release).''
     
    1210A typical upgrade looks like the following:
    1311
    14  1. you upgrade the Trac source code - from the trunk, or from another official release
    15  2. you run the upgrade command to bring the SQL DB up-to-date with the new Trac engine. The table structure changes over time, so it is versioned, and the upgrade command looks for the current version of the DB and the one required by the engine, and performs an upgrade if required. If you fail to upgrade the DB, you'll end up with an "Internal server error", most of the time.
    16  3. optionally, you run the "wiki upgrade" to bring the original Wiki pages up-to-date
    17  4. optionally, you run the "resync" command to sync the Trac SVN DB with the current Subversion repository state.
     12 1. You upgrade the Trac source code - from an offical release or from a source checkout.
     13 2. You run the `trac-admin upgrade` command to bring the database up-to-date with the new Trac code. The table structure changes over time, but it is versioned. The upgrade command find the current version of the DB and the version required by the code, and performs an upgrade if required.
     14 3. Optionally, you can run the `wiki upgrade` command to bring the default Wiki pages up-to-date. Your `WikiStart` page will be left intact, of course.
     15
     16== From 0.8.x to 0.9 ==
     17
     18The database schema was changed between 0.8.x and 0.9. Existing environments must be upgraded before they can be used with Trac 0.9.
     19
     20The following command will automatically perform the upgrade:
     21{{{
     22 $ trac-admin /path/to/projectenv upgrade
     23}}}
     24
     25Trac environments are created with a default set of wiki pages. It's recommended to update these pages on existing environments whenever Trac is upgraded to get up-to-date documentation and additional functionality. The following command will perform the update:
     26{{{
     27 $ trac-admin /path/to/projectenv wiki upgrade
     28}}}
     29
     30If you're using [wiki:TracModPython mod_python], you will need to change the name of the mod_python handler in the Apache HTTPD configuration:
     31{{{
     32   from: PythonHandler trac.ModPythonHandler
     33   to:   PythonHandler trac.web.modpython_frontend
     34}}}
    1835
    1936== From 0.7.x to 0.8 ==
     
    4461}}}
    4562
    46 == Upgrading sqlite from 2.x to 3.x ==
    47 The database formats used by sqlite 2.x and sqlite 3.x are incompatible. If you upgrade your sqlite version (this can  also happen implicitly if you upgrade pysqlite) then you must convert your database.
     63== Upgrading SQLite from 2.x to 3.x ==
    4864
    49 To do this, install both sqlite 2.8 and sqlite 3.x  (they have different filenames so can coexist in the same directory), then use the following commands (Windows):
     65The database formats used by SQLite 2.x and sqlite 3.x are incompatible. If you upgrade your SQLite version (this can  also happen implicitly if you upgrade from PySQLite 1.0.x to 1.1.x or 2.x), then you must convert your database.
     66
     67To do this, install both SQLite 2.8 and SQLite 3.x  (they have different filenames so can coexist in the same directory). Then use the following commands (Windows):
    5068{{{
    51  c:\...> ren trac.db trac2.db
    52  c:\...> sqlite trac2.db .dump | sqlite3 trac.db
     69 $ mv trac.db trac2.db
     70 $ sqlite trac2.db .dump | sqlite3 trac.db
    5371}}}
    54 (Unix/Linux would be similar but with mv instead of ren)
    5572
    56 Then when you're happy with the conversion and tested everything ''(of course!)'' you can delete the trac2.db file.
     73Then when you're happy with the conversion and tested everything you can delete the trac2.db file.
    5774
    5875For more information see http://www.sqlite.org/version3.html
    5976
    60 
    61 
    6277-----
    6378See also: TracGuide, TracInstall