# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-30 20:17
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='NagiosHostgroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('last_database_update', models.DateTimeField(auto_now_add=True)),
                ('name', models.CharField(max_length=200)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='NagiosHostStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('last_database_update', models.DateTimeField(auto_now_add=True)),
                ('action_url', models.URLField(blank=True, null=True)),
                ('active_checks_enabled', models.BooleanField()),
                ('attempts', models.SmallIntegerField()),
                ('attempts_of', models.SmallIntegerField()),
                ('duration', models.DurationField()),
                ('has_been_acknowledged', models.BooleanField()),
                ('host_display_name', models.CharField(max_length=200)),
                ('host_name', models.CharField(max_length=200)),
                ('in_scheduled_downtime', models.BooleanField()),
                ('is_flapping', models.BooleanField()),
                ('last_check', models.DateTimeField()),
                ('notes_url', models.URLField(blank=True, null=True)),
                ('notifications_enabled', models.BooleanField()),
                ('passive_checks_enabled', models.BooleanField()),
                ('state_type', models.SmallIntegerField(choices=[[1, 'HARD'], [2, 'SOFT']])),
                ('status', models.SmallIntegerField(choices=[[1, 'OK'], [2, 'UP'], [3, 'DOWN'], [4, 'WARNING'], [5, 'CRITICAL'], [6, 'UNKNOWN'], [7, 'PENDING']])),
                ('status_information', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='NagiosServicegroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('last_database_update', models.DateTimeField(auto_now_add=True)),
                ('name', models.CharField(max_length=200)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='NagiosServiceStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('last_database_update', models.DateTimeField(auto_now_add=True)),
                ('action_url', models.URLField(blank=True, null=True)),
                ('active_checks_enabled', models.BooleanField()),
                ('attempts', models.SmallIntegerField()),
                ('attempts_of', models.SmallIntegerField()),
                ('duration', models.DurationField()),
                ('has_been_acknowledged', models.BooleanField()),
                ('host_display_name', models.CharField(max_length=200)),
                ('host_name', models.CharField(max_length=200)),
                ('in_scheduled_downtime', models.BooleanField()),
                ('is_flapping', models.BooleanField()),
                ('last_check', models.DateTimeField()),
                ('notes_url', models.URLField(blank=True, null=True)),
                ('notifications_enabled', models.BooleanField()),
                ('passive_checks_enabled', models.BooleanField()),
                ('state_type', models.SmallIntegerField(choices=[[1, 'HARD'], [2, 'SOFT']])),
                ('status', models.SmallIntegerField(choices=[[1, 'OK'], [2, 'UP'], [3, 'DOWN'], [4, 'WARNING'], [5, 'CRITICAL'], [6, 'UNKNOWN'], [7, 'PENDING']])),
                ('status_information', models.TextField()),
                ('service_description', models.CharField(max_length=200)),
                ('service_display_name', models.CharField(max_length=200)),
                ('host', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nagios_cache.NagiosHostStatus')),
            ],
        ),
        migrations.AddField(
            model_name='nagiosservicegroup',
            name='services',
            field=models.ManyToManyField(to='nagios_cache.NagiosServiceStatus'),
        ),
        migrations.AlterUniqueTogether(
            name='nagioshoststatus',
            unique_together=set([('host_name',)]),
        ),
        migrations.AddField(
            model_name='nagioshostgroup',
            name='hosts',
            field=models.ManyToManyField(to='nagios_cache.NagiosHostStatus'),
        ),
        migrations.AlterUniqueTogether(
            name='nagiosservicestatus',
            unique_together=set([('host', 'host_name', 'service_description')]),
        ),
    ]
