Files
edx-platform/lms/djangoapps/course_goals/migrations/0001_initial.py
usamasadiq 3d1f3cea64 Ran pyupgrade on lms/djangoapps/course_blocks
Ran pyupgrade on lms/djangoapps/course_goals
Ran pyugprade on lms/djangoapps/course_home_api
2021-02-19 16:29:52 +05:00

27 lines
1.0 KiB
Python

from django.db import migrations, models
from django.conf import settings
from opaque_keys.edx.django.models import CourseKeyField
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='CourseGoal',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('course_key', CourseKeyField(max_length=255, db_index=True)),
('goal_key', models.CharField(default='unsure', max_length=100, choices=[('certify', 'Earn a certificate.'), ('complete', 'Complete the course.'), ('explore', 'Explore the course.'), ('unsure', 'Not sure yet.')])),
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)),
],
),
migrations.AlterUniqueTogether(
name='coursegoal',
unique_together={('user', 'course_key')},
),
]