added unit tests for postgres and mysql