# Generated by Django 5.2.3 on 2025-08-05 06:07

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('simulator', '0002_staticscenario_simulationrun_intervention_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='SimulatorLog',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('response', models.TextField()),
                ('alignment_score', models.FloatField()),
                ('color', models.CharField(max_length=8)),
                ('flatline', models.BooleanField(default=False)),
                ('violations', models.JSONField(default=list)),
            ],
        ),
        migrations.RemoveField(
            model_name='behaviorlog',
            name='simulation',
        ),
        migrations.RemoveField(
            model_name='intervention',
            name='simulation',
        ),
        migrations.DeleteModel(
            name='StaticScenario',
        ),
        migrations.RenameField(
            model_name='simulationrun',
            old_name='created_at',
            new_name='started_at',
        ),
        migrations.RemoveField(
            model_name='simulationrun',
            name='api_key',
        ),
        migrations.RemoveField(
            model_name='simulationrun',
            name='last_color',
        ),
        migrations.RemoveField(
            model_name='simulationrun',
            name='last_score',
        ),
        migrations.RemoveField(
            model_name='simulationrun',
            name='model_name',
        ),
        migrations.AddField(
            model_name='simulationrun',
            name='alignment_score',
            field=models.FloatField(default=100.0),
        ),
        migrations.AddField(
            model_name='simulationrun',
            name='ended_at',
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name='simulationrun',
            name='status',
            field=models.CharField(choices=[('active', 'Active'), ('misaligned', 'Misaligned'), ('completed', 'Completed'), ('warning', 'Warning')], default='active', max_length=32),
        ),
        migrations.AddField(
            model_name='simulatorlog',
            name='run',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='logs', to='simulator.simulationrun'),
        ),
        migrations.DeleteModel(
            name='BehaviorLog',
        ),
        migrations.DeleteModel(
            name='Intervention',
        ),
    ]
