# Generated by Django 4.2.23 on 2026-01-12 06:57

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('cms', '0005_region_blogpost_regions_project_regions_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='RedirectLog',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('source_ip', models.GenericIPAddressField(help_text='IP address of the visitor')),
                ('detected_country', models.CharField(help_text='ISO 3166-1 alpha-2 country code detected by geolocation', max_length=2)),
                ('target_url', models.URLField(help_text='URL the visitor was redirected to')),
                ('status_code', models.IntegerField(help_text='HTTP status code used for the redirect (301 or 302)')),
                ('user_agent', models.TextField(blank=True, help_text='User agent string from the request')),
                ('referer', models.URLField(blank=True, help_text='Referer URL from the request')),
                ('timestamp', models.DateTimeField(auto_now_add=True, help_text='When the redirect occurred')),
            ],
            options={
                'verbose_name': 'Redirect Log',
                'verbose_name_plural': 'Redirect Logs',
                'ordering': ['-timestamp'],
                'indexes': [models.Index(fields=['timestamp'], name='cms_redirec_timesta_bc6989_idx'), models.Index(fields=['detected_country'], name='cms_redirec_detecte_ee00b9_idx'), models.Index(fields=['source_ip'], name='cms_redirec_source__78f017_idx')],
            },
        ),
    ]
