# Generated by Django 6.0.2 on 2026-03-19 00:10

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


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0061_delete_sessioncron'),
    ]

    operations = [
        migrations.CreateModel(
            name='ProcessRun',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('session_id', models.CharField(max_length=200)),
                ('started_at', models.DateTimeField()),
            ],
            options={
                'indexes': [models.Index(fields=['session_id'], name='idx_processrun_session')],
            },
        ),
        migrations.CreateModel(
            name='SessionCron',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cron_id', models.CharField(max_length=100, unique=True)),
                ('session_id', models.CharField(max_length=200)),
                ('cron_expr', models.CharField(max_length=100)),
                ('recurring', models.BooleanField()),
                ('prompt', models.TextField()),
                ('created_at', models.DateTimeField()),
                ('next_fire', models.DateTimeField()),
                ('process_run', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='crons', to='core.processrun')),
            ],
            options={
                'indexes': [models.Index(fields=['session_id'], name='idx_sessioncron_session')],
            },
        ),
    ]
