1 from django.db import models
3 class MigrationHistory(models.Model):
4 app_name = models.CharField(max_length=255)
5 migration = models.CharField(max_length=255)
6 applied = models.DateTimeField(blank=True, null=True)
9 def for_migration(cls, app_name, migration):
11 return cls.objects.get(
13 migration = migration,
15 except cls.DoesNotExist:
18 migration = migration,