Commit 2c83bb20 authored by Michal Čihař's avatar Michal Čihař

Add contentsum field to all unit data stuff

This will be used for linking instead of checksum (issue #326).
parent 1f6b1c52
......@@ -101,6 +101,7 @@ class SuggestionManager(models.Manager):
class Suggestion(models.Model, RelatedUnitMixin):
checksum = models.CharField(max_length=40, db_index=True)
contentsum = models.CharField(max_length=40, db_index=True)
target = models.TextField()
user = models.ForeignKey(User, null=True, blank=True)
project = models.ForeignKey(Project)
......@@ -253,6 +254,7 @@ class CommentManager(models.Manager):
class Comment(models.Model, RelatedUnitMixin):
checksum = models.CharField(max_length=40, db_index=True)
contentsum = models.CharField(max_length=40, db_index=True)
comment = models.TextField()
user = models.ForeignKey(User, null=True, blank=True)
project = models.ForeignKey(Project)
......@@ -279,6 +281,7 @@ CHECK_CHOICES = [(x, CHECKS[x].name) for x in CHECKS]
class Check(models.Model, RelatedUnitMixin):
checksum = models.CharField(max_length=40, db_index=True)
contentsum = models.CharField(max_length=40, db_index=True)
project = models.ForeignKey(Project)
language = models.ForeignKey(Language, null=True, blank=True)
check = models.CharField(max_length=20, choices=CHECK_CHOICES)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment