Update GenerateFromDb.php to support PostgreSQL in extendedmodels branch.

This pull request is merged in the `master` branch but not in the `Gadoma-extendedmodels` branch.