Analyze before the table swap

The plugin now checks for errors and kills the migration if the analyze fails.