# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-08-29 15:56
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='Supervisor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('url', models.URLField(help_text='supervisor web url')),
                ('identification', models.CharField(help_text='supervisor server identification', max_length=254, unique=True)),
                ('username', models.CharField(blank=True, max_length=128, null=True)),
                ('password', models.CharField(blank=True, max_length=128, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='SupervisorService',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=254)),
                ('group', models.CharField(max_length=254)),
                ('pid', models.IntegerField()),
                ('state', models.IntegerField()),
                ('start_timestamp', models.PositiveIntegerField()),
                ('stop_timestamp', models.PositiveIntegerField()),
                ('now_timestamp', models.PositiveIntegerField()),
                ('exit_status', models.IntegerField()),
                ('modify_time', models.DateTimeField(auto_now=True, null=True)),
                ('supervisor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='services', to='supervisor_monitor.Supervisor')),
            ],
        ),
    ]
