Skip to content

tombstone

django_spire.contrib.sync.django.models.tombstone

SyncTombstone

Bases: Model

model_label = models.CharField(max_length=255) class-attribute instance-attribute

record_key = models.CharField(max_length=255) class-attribute instance-attribute

timestamp = models.BigIntegerField() class-attribute instance-attribute

created_at = models.DateTimeField(auto_now_add=True) class-attribute instance-attribute

Meta

app_label = 'sync' class-attribute instance-attribute
db_table = 'django_spire_sync_tombstone' class-attribute instance-attribute
unique_together = [('model_label', 'record_key')] class-attribute instance-attribute
indexes = [models.Index(fields=['model_label', 'timestamp'], name='sync_tombstone_model_ts_idx')] class-attribute instance-attribute

__str__

Source code in django_spire/contrib/sync/django/models/tombstone.py
def __str__(self) -> str:
    return f'{self.model_label}:{self.record_key} @ {self.timestamp}'