# Generated by Django 2.2.4 on 2019-09-03 10:24

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


class Migration(migrations.Migration):

    dependencies = [
        ('nagios', '0010_auto_20190902_1444'),
    ]

    operations = [
        migrations.CreateModel(
            name='NagiosHostTemplate',
            fields=[
                ('created', models.DateField(auto_now_add=True, null=True)),
                ('last_updated', models.DateTimeField(auto_now=True, null=True)),
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255, unique=True)),
                ('max_check_attempts', models.SmallIntegerField(blank=True, null=True)),
                ('notification_interval', models.SmallIntegerField(blank=True, null=True)),
                ('notification_options', models.CharField(blank=True, max_length=64, null=True)),
                ('notifications_enabled', models.SmallIntegerField(blank=True, null=True)),
                ('check_command', models.ForeignKey(blank=True, db_column='check_command', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='nagios.NagiosCheck')),
            ],
            options={
                'db_table': 'nagios_hosttemplates',
                'managed': True,
            },
        ),
        migrations.RenameModel(
            old_name='NagiosTimeperiods',
            new_name='NagiosTimePeriod',
        ),
        migrations.DeleteModel(
            name='NagiosHosttemplates',
        ),
        migrations.AddField(
            model_name='nagioshosttemplate',
            name='notification_period',
            field=models.ForeignKey(blank=True, db_column='notification_period', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='nagios.NagiosTimePeriod'),
        ),
        migrations.AddField(
            model_name='nagioshosttemplate',
            name='use_template',
            field=models.ForeignKey(blank=True, db_column='use_template', null=True, on_delete=django.db.models.deletion.CASCADE, to='nagios.NagiosHostTemplate'),
        ),
    ]
