123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- # Generated by Django 4.0.3 on 2022-03-16 23:23
- import django.contrib.postgres.fields.hstore
- from django.db import migrations, models
- import django.db.models.deletion
- def forwards_func(apps, schema_editor):
- TransactionEvent = apps.get_model("performance", "TransactionEvent")
- qs = TransactionEvent.objects.all()
- qs._raw_delete(qs.db)
- def reverse_func(apps, schema_editor):
- pass
- class Migration(migrations.Migration):
- dependencies = [
- ("projects", "0008_alter_projectkey_created"),
- ("performance", "0003_transactionevent"),
- ]
- operations = [
- migrations.RunPython(forwards_func, reverse_func),
- migrations.RemoveField(
- model_name="transactionevent",
- name="project",
- ),
- migrations.AddField(
- model_name="transactionevent",
- name="trace_id",
- field=models.UUIDField(
- db_index=True, default="00000000000000000000000000000000"
- ),
- preserve_default=False,
- ),
- migrations.CreateModel(
- name="TransactionGroup",
- fields=[
- (
- "id",
- models.AutoField(
- auto_created=True,
- primary_key=True,
- serialize=False,
- verbose_name="ID",
- ),
- ),
- ("created", models.DateTimeField(auto_now_add=True, db_index=True)),
- ("title", models.CharField(max_length=1024)),
- ("op", models.CharField(max_length=255)),
- ("method", models.CharField(blank=True, max_length=255, null=True)),
- (
- "project",
- models.ForeignKey(
- on_delete=django.db.models.deletion.CASCADE,
- to="projects.project",
- ),
- ),
- ],
- options={
- "unique_together": {("title", "project", "op", "method")},
- },
- ),
- migrations.CreateModel(
- name="Span",
- fields=[
- (
- "id",
- models.AutoField(
- auto_created=True,
- primary_key=True,
- serialize=False,
- verbose_name="ID",
- ),
- ),
- ("created", models.DateTimeField(auto_now_add=True, db_index=True)),
- ("span_id", models.CharField(max_length=16)),
- (
- "parent_span_id",
- models.CharField(blank=True, max_length=16, null=True),
- ),
- ("op", models.CharField(max_length=255)),
- (
- "description",
- models.CharField(blank=True, max_length=1024, null=True),
- ),
- ("start_timestamp", models.DateTimeField()),
- ("timestamp", models.DateTimeField()),
- (
- "tags",
- django.contrib.postgres.fields.hstore.HStoreField(default=dict),
- ),
- (
- "data",
- django.contrib.postgres.fields.hstore.HStoreField(default=dict),
- ),
- (
- "transaction",
- models.ForeignKey(
- on_delete=django.db.models.deletion.CASCADE,
- to="performance.transactionevent",
- ),
- ),
- ],
- options={
- "abstract": False,
- },
- ),
- migrations.AddField(
- model_name="transactionevent",
- name="group",
- field=models.ForeignKey(
- default=1,
- on_delete=django.db.models.deletion.CASCADE,
- to="performance.transactiongroup",
- ),
- preserve_default=False,
- ),
- ]
|