Db switch according to environment