0012_comment.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Generated by Django 4.1.7 on 2023-03-21 13:08
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. class Migration(migrations.Migration):
  6. dependencies = [
  7. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  8. ("issues", "0011_auto_20230123_0736"),
  9. ]
  10. operations = [
  11. migrations.CreateModel(
  12. name="Comment",
  13. fields=[
  14. (
  15. "id",
  16. models.BigAutoField(
  17. auto_created=True,
  18. primary_key=True,
  19. serialize=False,
  20. verbose_name="ID",
  21. ),
  22. ),
  23. ("created", models.DateTimeField(auto_now_add=True, db_index=True)),
  24. ("text", models.TextField(blank=True, null=True)),
  25. (
  26. "issue",
  27. models.ForeignKey(
  28. on_delete=django.db.models.deletion.CASCADE, to="issues.issue"
  29. ),
  30. ),
  31. (
  32. "user",
  33. models.ForeignKey(
  34. null=True,
  35. on_delete=django.db.models.deletion.SET_NULL,
  36. to=settings.AUTH_USER_MODEL,
  37. ),
  38. ),
  39. ],
  40. options={
  41. "abstract": False,
  42. },
  43. ),
  44. ]