migrate and make first query