0010_eventprojecthourlystatistic.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Generated by Django 4.1.3 on 2022-12-12 22:08
  2. import django.db.models.deletion
  3. from django.db import migrations, models
  4. class Migration(migrations.Migration):
  5. dependencies = [
  6. (
  7. "projects",
  8. "0001_squashed_0009_alter_project_id_alter_projectcounter_id_and_more",
  9. ),
  10. ]
  11. operations = [
  12. migrations.CreateModel(
  13. name="EventProjectHourlyStatistic",
  14. fields=[
  15. (
  16. "id",
  17. models.BigAutoField(
  18. auto_created=True,
  19. primary_key=True,
  20. serialize=False,
  21. verbose_name="ID",
  22. ),
  23. ),
  24. ("date", models.DateTimeField()),
  25. ("count", models.PositiveIntegerField()),
  26. (
  27. "project",
  28. models.ForeignKey(
  29. on_delete=django.db.models.deletion.CASCADE,
  30. to="projects.project",
  31. ),
  32. ),
  33. ],
  34. options={
  35. "unique_together": {("project", "date")},
  36. },
  37. ),
  38. ]