# Generated by Django 4.2.7 on 2025-12-16 23:32

from django.db import migrations, models
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='OrbitEntry',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, help_text='Unique identifier for this entry', primary_key=True, serialize=False)),
                ('type', models.CharField(choices=[('request', 'HTTP Request'), ('query', 'SQL Query'), ('log', 'Log Entry'), ('exception', 'Exception'), ('job', 'Background Job')], db_index=True, help_text='Type of telemetry entry', max_length=20)),
                ('family_hash', models.CharField(blank=True, db_index=True, help_text='Hash to group related entries (e.g., all queries for one request)', max_length=64, null=True)),
                ('payload', models.JSONField(default=dict, help_text='JSON payload containing event-specific data')),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True, help_text='When this entry was created')),
                ('duration_ms', models.FloatField(blank=True, help_text='Duration in milliseconds (for performance tracking)', null=True)),
            ],
            options={
                'verbose_name': 'Orbit Entry',
                'verbose_name_plural': 'Orbit Entries',
                'ordering': ['-created_at'],
                'indexes': [models.Index(fields=['-created_at', 'type'], name='orbit_orbit_created_5117be_idx'), models.Index(fields=['family_hash', 'created_at'], name='orbit_orbit_family__c5903e_idx')],
            },
        ),
    ]
