from django.db import migrations, models


class Migration(migrations.Migration):
    """
    A heartbeat row per scheduled command.

    Nothing in the panel could tell whether cron was still running. The jobs
    leave no trace when they succeed and no trace when they stop, so a dead
    crontab looked exactly like a quiet week. Additive, nothing else changes.
    """

    dependencies = [
        ('ftlink', '0003_incident'),
    ]

    operations = [
        migrations.CreateModel(
            name='JobRun',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=60, unique=True)),
                ('last_run_at', models.DateTimeField(auto_now=True)),
                ('ok', models.BooleanField(default=True)),
                ('note', models.CharField(blank=True, max_length=200)),
            ],
            options={
                'verbose_name': 'Job Run',
                'verbose_name_plural': 'Job Runs',
                'ordering': ['name'],
            },
        ),
    ]
