修复 MySQL 上时间戳字段溢出的问题

This commit is contained in:
virusdefender 2015-12-08 22:39:26 +08:00
parent bd5caa8f28
commit 3afdc1a58b
2 changed files with 30 additions and 2 deletions

View File

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-08 13:06
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('submission', '0007_auto_20151207_1645'),
]
operations = [
migrations.AlterField(
model_name='submission',
name='judge_end_time',
field=models.BigIntegerField(blank=True, null=True),
),
migrations.AlterField(
model_name='submission',
name='judge_start_time',
field=models.BigIntegerField(blank=True, null=True),
),
]

View File

@ -9,9 +9,9 @@ class Submission(models.Model):
user_id = models.IntegerField(db_index=True)
create_time = models.DateTimeField(auto_now_add=True)
# 判题开始时间
judge_start_time = models.IntegerField(blank=True, null=True)
judge_start_time = models.BigIntegerField(blank=True, null=True)
# 判题结束时间
judge_end_time = models.IntegerField(blank=True, null=True)
judge_end_time = models.BigIntegerField(blank=True, null=True)
result = models.IntegerField(default=result["waiting"])
language = models.IntegerField()
code = models.TextField()
@ -28,3 +28,6 @@ class Submission(models.Model):
class Meta:
db_table = "submission"
def __unicode__(self):
return self.id