# Generated by Django 3.2.19 on 2024-02-23 12:19

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


class Migration(migrations.Migration):

    dependencies = [
        ('db', '0015_alter_fileinartifact_file_non_null'),
    ]

    operations = [
        migrations.AddField(
            model_name='worker',
            name='concurrency',
            field=models.PositiveIntegerField(
                default=1,
                help_text='Number of tasks this worker can run simultaneously',
            ),
        ),
        migrations.AddField(
            model_name='worker',
            name='internal',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterField(
            model_name='worker',
            name='token',
            field=models.OneToOneField(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name='worker',
                to='db.token',
            ),
        ),
        migrations.AddConstraint(
            model_name='worker',
            constraint=models.CheckConstraint(
                check=models.Q(
                    ('internal', True),
                    ('token__isnull', False),
                    _connector='OR',
                ),
                name='db_worker_internal_or_token',
            ),
        ),
    ]
