Fix ticket 23699 Migrate in unittest still loads initial data

Fixed #23699 Migrate in unittest still loads initial data
needed? don't think any books would be deleted by this query.