using code instead of id and using postgresql for all environtments