Upgrading from a previous version

Upgrading the database schema

SQL scripts are provided to upgrade an existing Manitou-Mail database from one version to the next one. They're located in the sql/ directory at the root of the source tree and should be fed to the PostgreSQL command line tool (psql)

For example, to upgrade from 0.9.6 to 0.9.7, the script upgrade-0.9.7.sql should be run like this (input is shown using bold face, output using plain face).

~/src/manitou-0.9.7/sql$ psql -U mailadmin -d mail
Welcome to psql 7.4.12, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

mail=> \i upgrade-0.9.7.sql
DROP TABLE
CREATE TABLE
CREATE INDEX
CREATE TABLE
CREATE INDEX
DROP INDEX
UPDATE 1
mail=> \q

The current version number can be read by querying the runtime_info table:

mail=> SELECT rt_value FROM runtime_info where rt_key='schema_version';
 rt_value 
----------
 0.9.7
(1 row)

To upgrade from an older version, the SQL upgrade scripts should be run by order of oldest to newest versions.

Upgrading the word index

Versions 0.9.7 and above come with a new word-indexing method that requires to entirely reindex the mail contents to be searchable in full-text mode with the 0.9.7 user interface.

This is done with a Perl script located in the manitou-mdx package: manitou-reindex-words.pl