add the logic to replace environment settings at the DB level