Configures database for environments