NDOJ/judge/migrations/0192_course_lesson_problem.py
Phuoc Anh Kha Le c833dc06d9
Add order and score for course problems (#124)
* Add order and grade for course problems

* Fix delete problems bug
2024-09-03 09:26:20 -05:00

44 lines
1.3 KiB
Python

# Generated by Django 3.2.21 on 2024-09-02 05:28
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("judge", "0191_deprecate_old_org_image"),
]
operations = [
migrations.CreateModel(
name="CourseLessonProblem",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("order", models.IntegerField(default=0, verbose_name="order")),
("score", models.IntegerField(default=0, verbose_name="score")),
(
"lesson",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="lesson_problems",
to="judge.courselesson",
),
),
(
"problem",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="judge.problem"
),
),
],
),
]