GNU Gatekeeper Logo

Home
· Download
· Support
· Site Map

Documentation
· English Manual
· French Manual
· Spanish Manual
· Persian Manual
· Portuguese Manual
· Chinese Manual
· FAQ
· Interoperability
· Intro to H.323
· Usage Examples
· Configuration Notes
· GnuGk and SIP

Tools & Addons
· Java GUI
· ISDN Gateway
· CTI / ACD
· GnuGk Addons
· Endpoints
· Gateways
· MCUs
· IVRs
· Billing
· Commercial Addons

Development
· Development Version
· Compiling
· NAT Traversal
· Tools
· Authors

Misc
· Events
· Logos
· Recommended Books
· Success Stories

Upgrading the PostgreSQL Schema

If you want to upgrade your SQLBill installation to install a new version, you have to use the following procedure. During the upgrade, the database should not be in use by other applications, RADIUS server or GnuGk.

1. Change the current directory to 'src'. Connect to the existing database 'voipdb' as a user 'gkradius':

   psql -U gkradius -h IP_ADDRESS voipdb

2. Start a new SQL transaction:

   BEGIN;

This is a very important step - as it makes possible to rollback all changes in case of any failure.

3. Delete old functions and triggers, best if you use d_all_functions.sql script from your existing SqlBill installation, not the one from the version being installed:

   \i d_all_functions.sql

4. Upgrade all tables using upgrade_tables.sql script:

   \i upgrade_tables.sql

Some warnings (marked with NOTICE) may appear during database schema creation, but can be ignored safely. The upgrade result is displayed. If it indicates failure or there were some errors during upgrade process, undo all changes by:

   ROLLBACK;

and skip further steps.

5. Upgrade all functions:

   \i upgrade_functions.sql

In case of any errors - ROlLBACK.

6. You are done, the database schema is upgraded. Type:

   COMMIT;

to store changes permanently.

 




Last updated: 04. Apr 2008
Page maintained by Jan Willamowius