# Generated by Django 3.1.5 on 2021-01-08 05:44

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Package',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_dt', models.DateTimeField(blank=True, editable=False, help_text='ModelTimetrackingMixin.create_dt.help_text', null=True, verbose_name='ModelTimetrackingMixin.create_dt.verbose_name')),
                ('update_dt', models.DateTimeField(blank=True, editable=False, help_text='ModelTimetrackingMixin.update_dt.help_text', null=True, verbose_name='ModelTimetrackingMixin.update_dt.verbose_name')),
                ('project_name', models.CharField(help_text='Package.project_name.help_text', max_length=128, verbose_name='Package.project_name.verbose_name')),
                ('url', models.URLField(help_text='Package.url.help_text', unique=True, verbose_name='Package.url.verbose_name')),
                ('branch_name', models.CharField(help_text='Package.branch_name.help_text', max_length=64, verbose_name='Package.branch_name.verbose_name')),
                ('args', models.TextField(default='domain=domain.tld\npath=/path', help_text='Package.args.help_text', verbose_name='Package.args.verbose_name')),
            ],
            options={
                'verbose_name': 'Package',
                'verbose_name_plural': 'Packages',
            },
        ),
        migrations.CreateModel(
            name='Check',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_dt', models.DateTimeField(blank=True, editable=False, help_text='ModelTimetrackingMixin.create_dt.help_text', null=True, verbose_name='ModelTimetrackingMixin.create_dt.verbose_name')),
                ('update_dt', models.DateTimeField(blank=True, editable=False, help_text='ModelTimetrackingMixin.update_dt.help_text', null=True, verbose_name='ModelTimetrackingMixin.update_dt.verbose_name')),
                ('task_id', models.UUIDField(editable=False, help_text='Check.task_id.help_text', verbose_name='Check.task_id.verbose_name')),
                ('output', models.TextField(editable=False, help_text='Check.output.help_text', verbose_name='Check.output.verbose_name')),
                ('status', models.CharField(blank=True, choices=[('unknown', 'Unknown'), ('running', 'CI is Running'), ('success', 'CI run successful'), ('fail', 'CI run failed')], default='unknown', editable=False, help_text='Check.status.help_text', max_length=7, null=True, verbose_name='Check.status.verbose_name')),
                ('package', models.ForeignKey(help_text='Check.package.help_text', on_delete=django.db.models.deletion.CASCADE, related_name='checks', to='ci_ynh.package', verbose_name='Check.package.verbose_name')),
            ],
            options={
                'verbose_name': 'Pipeline status',
                'verbose_name_plural': 'Pipeline status',
            },
        ),
    ]
