You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.6 KiB

  1. # Generated by Django 4.1.10 on 2023-07-24 05:39
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. import uuid
  6. class Migration(migrations.Migration):
  7. dependencies = [
  8. ("projects", "0008_project_allow_member_to_create_label_type_and_more"),
  9. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  10. ("examples", "0007_example_score"),
  11. ]
  12. operations = [
  13. migrations.CreateModel(
  14. name="Assignment",
  15. fields=[
  16. ("id", models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
  17. ("created_at", models.DateTimeField(auto_now_add=True, db_index=True)),
  18. ("updated_at", models.DateTimeField(auto_now=True)),
  19. (
  20. "assignee",
  21. models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
  22. ),
  23. (
  24. "example",
  25. models.ForeignKey(
  26. on_delete=django.db.models.deletion.CASCADE, related_name="assignments", to="examples.example"
  27. ),
  28. ),
  29. (
  30. "project",
  31. models.ForeignKey(
  32. on_delete=django.db.models.deletion.CASCADE, related_name="assignments", to="projects.project"
  33. ),
  34. ),
  35. ],
  36. options={
  37. "unique_together": {("example", "assignee")},
  38. },
  39. ),
  40. ]