<reponame>Rmond/OperMge<filename>hd_mesos/migrations/0001_initial.py
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-06-01 09:56
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('django_celery_results', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Host_Group',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='HostGroup',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('groupname', models.CharField(max_length=32, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='HostInfo',
            fields=[
                ('hostname', models.CharField(max_length=32)),
                ('ip', models.CharField(max_length=16, primary_key=True, serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='User_Host',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('ip', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd_mesos.HostInfo')),
            ],
        ),
        migrations.CreateModel(
            name='User_Hostgroup',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd_mesos.HostGroup')),
            ],
        ),
        migrations.CreateModel(
            name='User_Task',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('taskid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_celery_results.TaskResult')),
            ],
        ),
        migrations.CreateModel(
            name='Users',
            fields=[
                ('username', models.CharField(max_length=32, primary_key=True, serialize=False)),
                ('nickname', models.CharField(max_length=16)),
                ('password', models.CharField(max_length=128)),
                ('role', models.PositiveSmallIntegerField(default=1)),
            ],
        ),
        migrations.AddField(
            model_name='user_task',
            name='username',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd_mesos.Users'),
        ),
        migrations.AddField(
            model_name='user_hostgroup',
            name='username',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd_mesos.Users'),
        ),
        migrations.AddField(
            model_name='user_host',
            name='username',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd_mesos.Users'),
        ),
        migrations.AddField(
            model_name='host_group',
            name='group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd_mesos.HostGroup'),
        ),
        migrations.AddField(
            model_name='host_group',
            name='ip',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd_mesos.HostInfo'),
        ),
    ]
