Database automatic upgrade script

This script is intended to automatically
take care of database upgrading.

Issue #100