# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-07-04 08:43
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Code',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.CharField(max_length=2000)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('path', models.CharField(max_length=2000)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('dir', models.CharField(max_length=100)),
                ('url', models.CharField(max_length=2000)),
            ],
        ),
        migrations.CreateModel(
            name='Host',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hostip', models.GenericIPAddressField()),
                ('hostpwd', models.CharField(blank=True, max_length=200, null=True)),
                ('user', models.CharField(default='root', max_length=200)),
                ('port', models.IntegerField(default=22)),
            ],
        ),
        migrations.CreateModel(
            name='HostStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Language',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='NginxHost',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hostip', models.GenericIPAddressField()),
                ('hostpwd', models.CharField(blank=True, max_length=200, null=True)),
                ('user', models.CharField(default='root', max_length=200)),
                ('port', models.IntegerField(default=22)),
                ('status', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='web.HostStatus')),
            ],
        ),
        migrations.CreateModel(
            name='Relat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('code', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='web.Code')),
                ('host', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='web.Host')),
            ],
        ),
        migrations.CreateModel(
            name='Status',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('groupname', models.CharField(max_length=200)),
                ('path', models.CharField(max_length=200)),
                ('teamport', models.CharField(max_length=200)),
                ('svnpath', models.CharField(blank=True, max_length=200, null=True)),
                ('svnuser', models.CharField(blank=True, max_length=200, null=True)),
                ('svnpwd', models.CharField(blank=True, max_length=200, null=True)),
                ('nginxconf', models.CharField(blank=True, max_length=200, null=True)),
                ('nginxupstream', models.CharField(blank=True, max_length=200, null=True)),
                ('url', models.CharField(blank=True, max_length=200, null=True)),
                ('ps', models.CharField(blank=True, max_length=200, null=True)),
                ('datapath', models.CharField(max_length=200)),
                ('host', models.ManyToManyField(to='web.Host')),
                ('language_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='web.Language')),
                ('nginxhost', models.ManyToManyField(to='web.NginxHost')),
                ('userid', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='relat',
            name='status',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='web.Status'),
        ),
        migrations.AddField(
            model_name='host',
            name='status',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='web.HostStatus'),
        ),
        migrations.AddField(
            model_name='code',
            name='status',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='web.Status'),
        ),
        migrations.AddField(
            model_name='code',
            name='team',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='web.Team'),
        ),
        migrations.AddField(
            model_name='code',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
