Migrating to PostgreSQL

Some changes have been made in order to change the database used under the production environment.