Skip to content

Commit

Permalink
remove unnecessary migration
Browse files Browse the repository at this point in the history
  • Loading branch information
aaxelb committed Jan 21, 2025
1 parent b886653 commit 4bbcfbf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.

This file was deleted.

12 changes: 11 additions & 1 deletion share/models/index_backfill.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class IndexBackfill(models.Model):
)
backfill_status = models.TextField(choices=BACKFILL_STATUS_CHOICES, default=INITIAL)
index_strategy_name = models.TextField(unique=True)
strategy_checksum = models.TextField()
specific_indexname = models.TextField()
error_type = models.TextField(blank=True)
error_message = models.TextField(blank=True)
error_context = models.TextField(blank=True)
Expand All @@ -68,6 +68,16 @@ def __repr__(self):
def __str__(self):
return repr(self)

@property
def strategy_checksum(self):
# back-compat alias for specific_indexname (may be removed if that's renamed via migration)
return self.specific_indexname # for backcompat

@strategy_checksum.setter
def strategy_checksum(self, value):
# back-compat alias for specific_indexname (may be removed if that's renamed via migration)
self.specific_indexname = value

@contextlib.contextmanager
def mutex(self):
with IndexBackfill.objects.get_with_mutex(pk=self.pk) as index_backfill:
Expand Down

0 comments on commit 4bbcfbf

Please sign in to comment.