# Generated by Django 2.1.2 on 2018-10-23 17:58

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, default='', max_length=200)),
                ('url', models.URLField(default='')),
                ('method', models.CharField(choices=[('get', 'get'), ('post', 'post'), ('patch', 'patch'), ('put', 'put')], default='get', max_length=20)),
                ('timeout', models.IntegerField(blank=True, default=None, null=True)),
                ('headers', models.TextField(blank=True, default='')),
                ('parameters', models.TextField(blank=True, default='')),
                ('debug_url', models.URLField(blank=True, default='')),
                ('debug_headers', models.TextField(blank=True, default='')),
                ('debug_parameters', models.TextField(blank=True, default='')),
            ],
        ),
        migrations.CreateModel(
            name='ServiceFailover',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.PositiveSmallIntegerField(verbose_name='order')),
                ('failover', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='failover', to='services.Service')),
                ('service', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='service', to='services.Service')),
            ],
            options={
                'ordering': ['order'],
            },
        ),
        migrations.AddField(
            model_name='service',
            name='service_failover',
            field=models.ManyToManyField(related_name='service_failover_relation', through='services.ServiceFailover', to='services.Service'),
        ),
    ]
