db migration and search