0003_transactionevent.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Generated by Django 3.1.5 on 2021-01-24 17:54
  2. from django.db import migrations, models
  3. import django.db.models.deletion
  4. import uuid
  5. class Migration(migrations.Migration):
  6. initial = True
  7. dependencies = [
  8. (
  9. "projects",
  10. "0001_squashed_0009_alter_project_id_alter_projectcounter_id_and_more",
  11. ),
  12. ("performance", "0002_auto_20210124_1745"),
  13. ]
  14. operations = [
  15. migrations.CreateModel(
  16. name="TransactionEvent",
  17. fields=[
  18. (
  19. "event_id",
  20. models.UUIDField(
  21. default=uuid.uuid4,
  22. editable=False,
  23. primary_key=True,
  24. serialize=False,
  25. ),
  26. ),
  27. ("created", models.DateTimeField(auto_now_add=True, db_index=True)),
  28. (
  29. "data",
  30. models.JSONField(help_text="General event data that is searchable"),
  31. ),
  32. (
  33. "timestamp",
  34. models.DateTimeField(
  35. blank=True,
  36. help_text="Date created as claimed by client it came from",
  37. null=True,
  38. ),
  39. ),
  40. ("transaction", models.CharField(max_length=1024)),
  41. ("start_timestamp", models.DateTimeField()),
  42. (
  43. "project",
  44. models.ForeignKey(
  45. on_delete=django.db.models.deletion.CASCADE,
  46. to="projects.project",
  47. ),
  48. ),
  49. ],
  50. options={
  51. "ordering": ["-created"],
  52. },
  53. ),
  54. ]