Migrate data from old models to new models.

In order for the migration to work successfully, the site will have to
run the migrations on this exact commit. Otherwise, the migrations that
these depend will be gone, as the badges app is going to be deleted.