38 lines
2.0 KiB
Python
38 lines
2.0 KiB
Python
|
|
# Generated by Django 5.2.17 on 2026-09-16 08:52
|
||
|
|
|
||
|
|
import django.db.models.deletion
|
||
|
|
from django.db import migrations, models
|
||
|
|
|
||
|
|
|
||
|
|
class Migration(migrations.Migration):
|
||
|
|
|
||
|
|
dependencies = [
|
||
|
|
('tracker', '0003_rawbatch'),
|
||
|
|
]
|
||
|
|
|
||
|
|
operations = [
|
||
|
|
migrations.CreateModel(
|
||
|
|
name='SourceClassification',
|
||
|
|
fields=[
|
||
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
|
('scope', models.CharField(max_length=16)),
|
||
|
|
('channel', models.CharField(blank=True, default='', max_length=32)),
|
||
|
|
('platform', models.CharField(blank=True, default='', max_length=64)),
|
||
|
|
('variant', models.CharField(blank=True, default='', max_length=64)),
|
||
|
|
('search_term', models.CharField(blank=True, default='', max_length=200)),
|
||
|
|
('evidence_kind', models.CharField(blank=True, default='', max_length=32)),
|
||
|
|
('resolution', models.CharField(blank=True, default='', max_length=16)),
|
||
|
|
('detail', models.JSONField(blank=True, default=dict)),
|
||
|
|
('rule_version', models.CharField(default='v1', max_length=16)),
|
||
|
|
('computed_at', models.DateTimeField(auto_now=True)),
|
||
|
|
('session', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='source_classifications', to='tracker.visitsession')),
|
||
|
|
('site', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='source_classifications', to='tracker.site')),
|
||
|
|
('visitor', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='source_classifications', to='tracker.visitor')),
|
||
|
|
],
|
||
|
|
options={
|
||
|
|
'db_table': 'source_classification',
|
||
|
|
'indexes': [models.Index(fields=['site', 'visitor', 'scope'], name='source_clas_site_id_58ad9c_idx'), models.Index(fields=['site', 'channel'], name='source_clas_site_id_f08b23_idx')],
|
||
|
|
},
|
||
|
|
),
|
||
|
|
]
|