Make migration slightly more robust

For some reason, when I dropped and migrated my database from scratch, this
migration would fail because it was using column definitions for the Site
table which changed some time ago. Defining local copies of the models didn't
fix the problem.