flake8: ignore migrations directories and fix warnings

I don't know why flake8 only now started picking up errors in the
migration directories. It also highlighted a bug where the shipping
models weren't checking if they're registered already, which would've
prevented overriding them.