21ca43248a
Co-Authored-By: Claude Code <noreply@anthropic.com>
34 lines
1.6 KiB
Python
34 lines
1.6 KiB
Python
# Generated by Django 5.2.17 on 2026-09-16 07:33
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('tracker', '0002_alter_dailystat_site_alter_event_session_and_more'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='RawBatch',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('batch_id', models.CharField(blank=True, default='', max_length=64)),
|
|
('body', models.TextField()),
|
|
('event_count', models.PositiveIntegerField(default=0)),
|
|
('rejected_count', models.PositiveIntegerField(default=0)),
|
|
('status', models.CharField(default='accepted', max_length=16)),
|
|
('received_at', models.DateTimeField(auto_now_add=True)),
|
|
('ip', models.GenericIPAddressField(blank=True, null=True)),
|
|
('site', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='raw_batches', to='tracker.site')),
|
|
('visitor', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='raw_batches', to='tracker.visitor')),
|
|
],
|
|
options={
|
|
'db_table': 'raw_batch',
|
|
'indexes': [models.Index(fields=['visitor', '-received_at'], name='raw_batch_visitor_9ea281_idx'), models.Index(fields=['site', '-received_at'], name='raw_batch_site_id_ad8e9f_idx')],
|
|
},
|
|
),
|
|
]
|