Updated "local" DB option to if case