-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path0001_initial.py
More file actions
78 lines (72 loc) · 2.6 KB
/
Copy path0001_initial.py
File metadata and controls
78 lines (72 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Generated by Django 4.2.20 on 2025-04-14 12:39
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import opaque_keys.edx.django.models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name="CourseArchiveStatus",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"course_id",
opaque_keys.edx.django.models.CourseKeyField(
db_index=True,
help_text="The unique identifier for the course.",
max_length=255,
),
),
(
"is_archived",
models.BooleanField(
db_index=True,
default=False,
help_text="Whether the course is archived.",
),
),
(
"archive_date",
models.DateTimeField(
blank=True,
help_text="The date and time when the course was archived.",
null=True,
),
),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
(
"user",
models.ForeignKey(
help_text="The user who this archive status is for.",
on_delete=django.db.models.deletion.CASCADE,
related_name="course_archive_statuses",
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"verbose_name": "Course Archive Status",
"verbose_name_plural": "Course Archive Statuses",
"ordering": ["-updated_at"],
},
),
migrations.AddConstraint(
model_name="coursearchivestatus",
constraint=models.UniqueConstraint(
fields=("course_id", "user"), name="unique_user_course_archive_status"
),
),
]