migrate to postgres json field

This commit is contained in:
zema1
2017-10-11 21:43:29 +08:00
parent 93bd77d8d8
commit 080ecf1bcf
15 changed files with 315 additions and 27 deletions

View File

@@ -1,5 +1,5 @@
from django.db import models
from jsonfield import JSONField
from utils.models import JSONField
from account.models import User
from contest.models import Contest
@@ -66,7 +66,7 @@ class Problem(models.Model):
submission_number = models.BigIntegerField(default=0)
accepted_number = models.BigIntegerField(default=0)
# ACM rule_type: {JudgeStatus.ACCEPTED: 3, JudgeStaus.WRONG_ANSWER: 11}, the number means count
statistic_info = JSONField(default={})
statistic_info = JSONField(default=dict)
class Meta:
db_table = "problem"