MCPcopy
hub / github.com/django/django / Migration

Method Migration

django/db/migrations/recorder.py:25–46  ·  view source on GitHub ↗

Lazy load to avoid AppRegistryNotReady if installed apps import MigrationRecorder.

(cls)

Source from the content-addressed store, hash-verified

23
24 @classproperty
25 def Migration(cls):
26 """
27 Lazy load to avoid AppRegistryNotReady if installed apps import
28 MigrationRecorder.
29 """
30 if cls._migration_class is None:
31
32 class Migration(models.Model):
33 app = models.CharField(max_length=255)
34 name = models.CharField(max_length=255)
35 applied = models.DateTimeField(default=now)
36
37 class Meta:
38 apps = Apps()
39 app_label = "migrations"
40 db_table = "django_migrations"
41
42 def __str__(self):
43 return "Migration %s for %s" % (self.name, self.app)
44
45 cls._migration_class = Migration
46 return cls._migration_class
47
48 def __init__(self, connection):
49 self.connection = connection

Callers 4

load_diskMethod · 0.80
test_autoMethod · 0.80
test_migration_pathMethod · 0.80

Calls

no outgoing calls

Tested by 3

test_autoMethod · 0.64
test_migration_pathMethod · 0.64