Fix for long slugs breaking migration

I'm going to merge this one myself, small enough change and isolated.