# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-05 08:51


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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Exporter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('job', models.CharField(max_length=128)),
                ('port', models.IntegerField()),
                ('path', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='Farm',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, unique=True)),
                ('source', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='Host',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('farm', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promgen.Farm')),
            ],
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, unique=True)),
                ('farm', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='promgen.Farm')),
            ],
        ),
        migrations.CreateModel(
            name='Rule',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, unique=True)),
                ('clause', models.CharField(max_length=128)),
                ('duration', models.CharField(choices=[('1s', '1s'), ('1m', '1m'), ('5m', '5m')], max_length=128)),
                ('labels', models.CharField(max_length=128)),
                ('annotations', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, unique=True)),
            ],
        ),
        migrations.AddField(
            model_name='rule',
            name='service',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promgen.Service'),
        ),
        migrations.AddField(
            model_name='project',
            name='service',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promgen.Service'),
        ),
        migrations.AddField(
            model_name='exporter',
            name='project',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promgen.Project'),
        ),
    ]
