This commit is contained in:
2025-05-09 08:21:18 +08:00
parent 8ded57cb46
commit fa3653010c
2 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.0.6 on 2025-05-09 00:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('problem', '0016_alter_problem_last_update_time'),
]
operations = [
migrations.AlterField(
model_name='problem',
name='last_update_time',
field=models.DateTimeField(auto_now=True, null=True),
),
]

View File

@@ -60,7 +60,7 @@ class Problem(models.Model):
template = JSONField() template = JSONField()
create_time = models.DateTimeField(auto_now_add=True) create_time = models.DateTimeField(auto_now_add=True)
# we can not use auto_now here # we can not use auto_now here
last_update_time = models.DateTimeField(auto_now=True) last_update_time = models.DateTimeField(auto_now=True, null=True)
created_by = models.ForeignKey(User, on_delete=models.CASCADE) created_by = models.ForeignKey(User, on_delete=models.CASCADE)
# ms # ms
time_limit = models.IntegerField() time_limit = models.IntegerField()