def migrate_reference_types(self):
        if self.parallel and self.parallel[1]:
            self.print_step("Loading reference types")
            self.reference_type_map = {r.name: r for r in ReferenceType.query}
            return
        self.print_step("Migrating reference types")
        for name in self.reference_types:
            self.reference_type_map[name] = reftype = ReferenceType(name=name)
            db.session.add(reftype)
            self.print_success(name)
        db.session.commit()