gem modification for pg db