Fix local test database issues