add getQueries for migration