Made legacy db global