# Generated by Django 3.2.19 on 2024-04-03 12:38

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


class Migration(migrations.Migration):

    dependencies = [
        ('db', '0028_workrequest_changes_for_workflows'),
    ]

    operations = [
        migrations.CreateModel(
            name='WorkflowTemplate',
            fields=[
                (
                    'id',
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name='ID',
                    ),
                ),
                ('name', models.CharField(max_length=255)),
                (
                    'task_name',
                    models.CharField(
                        max_length=100,
                        verbose_name='Name of the Workflow orchestrator class',
                    ),
                ),
                ('task_data', models.JSONField(blank=True, default=dict)),
                (
                    'workspace',
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        to='db.workspace',
                    ),
                ),
            ],
        ),
        migrations.AddConstraint(
            model_name='workflowtemplate',
            constraint=models.UniqueConstraint(
                fields=('name', 'workspace'),
                name='db_workflowtemplate_unique_name_workspace',
            ),
        ),
    ]
