Added rewriteAll() function to force migration on all entities