@classmethod
    def migration_required(self):
        try:
            AppliedMigration.objects.get(classname=str(self))

            if self.allow_updates:
                return None

            return False
        except AppliedMigration.DoesNotExist as e:
            return True
checks if the migration has already been applied
dataset/ETHPy150Open pboehm/django-data-migration/data_migration/migration.py/Migration.migration_required