Fix missing end from purged migrations

Fixes #1