Add v2 snapshot schema validation and import_snapshots command
This commit is contained in:
@ -57,6 +57,8 @@ class ImportFile(models.Model):
|
||||
related_name="files",
|
||||
)
|
||||
relative_path = models.CharField(max_length=260)
|
||||
source_name = models.CharField(max_length=120, blank=True)
|
||||
snapshot_date = models.DateField(blank=True, null=True)
|
||||
status = models.CharField(max_length=24, choices=FileStatus.choices, default=FileStatus.PENDING)
|
||||
checksum = models.CharField(max_length=128, blank=True)
|
||||
file_size_bytes = models.PositiveBigIntegerField(blank=True, null=True)
|
||||
@ -79,6 +81,7 @@ class ImportFile(models.Model):
|
||||
indexes = [
|
||||
models.Index(fields=["import_run", "status"]),
|
||||
models.Index(fields=["relative_path"]),
|
||||
models.Index(fields=["source_name", "snapshot_date"]),
|
||||
models.Index(fields=["processed_at"]),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user