0001_initial.py 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Generated by Django 3.0.8 on 2020-07-25 20:07
  2. from django.db import migrations, models
  3. import django.db.models.deletion
  4. class Migration(migrations.Migration):
  5. initial = True
  6. dependencies = [
  7. ("issues", "0001_squashed_0010_auto_20210117_1543"),
  8. (
  9. "projects",
  10. "0001_squashed_0009_alter_project_id_alter_projectcounter_id_and_more",
  11. ),
  12. ]
  13. operations = [
  14. migrations.CreateModel(
  15. name="UserReport",
  16. fields=[
  17. (
  18. "id",
  19. models.AutoField(
  20. auto_created=True,
  21. primary_key=True,
  22. serialize=False,
  23. verbose_name="ID",
  24. ),
  25. ),
  26. ("event_id", models.UUIDField()),
  27. ("name", models.CharField(max_length=128)),
  28. ("email", models.EmailField(max_length=254)),
  29. ("comments", models.TextField()),
  30. ("created", models.DateTimeField(auto_now_add=True, db_index=True)),
  31. (
  32. "issue",
  33. models.ForeignKey(
  34. null=True,
  35. on_delete=django.db.models.deletion.CASCADE,
  36. to="issues.Issue",
  37. ),
  38. ),
  39. (
  40. "project",
  41. models.ForeignKey(
  42. on_delete=django.db.models.deletion.CASCADE,
  43. to="projects.Project",
  44. ),
  45. ),
  46. ],
  47. options={
  48. "unique_together": {("project", "event_id")},
  49. },
  50. ),
  51. ]