PRepS Database Administration Manual | ||
---|---|---|
<<< Previous | Next >>> |
Periodically, as new versions of PRepS are released, modifications are made to the database schema. By convension, if the database schema is updated, the second number in the PRepS version is also updated. For example, if the previously installed version of PRepS is 1.4.4, and you upgrade to version 1.6.0, you will need to update any existing PRepS databases. On the other hand, upgrading from version 1.4.4 to 1.4.5 does not require a database update.
![]() | Development Versions |
---|---|
In the previous example, notice that the update involving a database update was from 1.4.x to 1.6.x. What happened to 1.5.x? In the tradition of several Open Source projects, if the second number is odd, it indicates that the version is part of a development series. The database schema will undergo several changes during a development series. For this reason, you should never use development versions of PRepS with production database. Only use test databases, or test copies of production databases. When testing development version, always update test databases between development version upgrades. |
update_prepsdb [-c | -h | -v] [-o path] [-P path] [-p path] [-u username] dbname
The update_prepsdb script is used to update existing databases to the current schema version. This script will destroy the current database, create a new database of the same name using the new schema, and load the newly created database with the data from the old database. A backup copy of the old database is automatically created first in case something goes wrong. The backup is stored in the current working directory in a file called DB_NAME.backup.
To ensure proper operation, the update_prepsdb script must be run from the PostgreSQL super user account. The update_prepsdb script understands the following options.
-c : Show the current schema version of the specified database and exit.
-h : Display a simple help message and exit.
-v : Show the version information and exit.
-o path : Allow the user to specify a writable directory that will be used for temp files, and for writing the log file.
-P path : Allow the user to supply the path to PL/pgSQL (plpgsql.so). Use this option if the script cannot find the PL/pgSQL library.
-p path : Specify the full path where the PostgreSQL tools are installed. Use this option if the PostgreSQL bin directory is not in your PATH.
-u user : Specify the user that should own the recreated database after the schema update.
<<< Previous | Home | Next >>> |
Creating Databases | Message Template Files |