# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-21 09:25
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='Instance',
            fields=[
                ('server_id', models.CharField(max_length=50, primary_key=True, serialize=False)),
                ('hostname', models.CharField(max_length=50)),
                ('operation_system', models.CharField(max_length=10)),
                ('state', models.CharField(max_length=10)),
                ('default_user', models.CharField(max_length=32)),
                ('default_password', models.CharField(max_length=32)),
                ('comments', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='IPAddress',
            fields=[
                ('ip_address', models.GenericIPAddressField(primary_key=True, serialize=False)),
                ('in_use', models.BooleanField(default=False)),
                ('allocated', models.BooleanField(default=False)),
                ('hostname', models.CharField(max_length=50)),
                ('mac_address', models.CharField(max_length=18)),
            ],
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('descrption', models.TextField()),
                ('created_at', models.DateTimeField()),
                ('terminated_at', models.DateTimeField()),
                ('in_use', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='Server',
            fields=[
                ('server_id', models.CharField(max_length=50, primary_key=True, serialize=False)),
                ('first_nic_mac', models.CharField(max_length=18)),
                ('interface_port', models.CharField(max_length=32)),
                ('vlan_mode', models.CharField(max_length=32)),
                ('operation_system', models.CharField(max_length=10)),
                ('default_user', models.CharField(max_length=32)),
                ('default_password', models.CharField(max_length=32)),
                ('state', models.CharField(max_length=10)),
                ('kvm_portal', models.CharField(max_length=200)),
                ('comments', models.TextField()),
                ('primary_ip', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='assets.IPAddress')),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='assets.Project')),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('nt_account', models.CharField(max_length=32, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=32)),
                ('email', models.EmailField(max_length=254)),
                ('resign', models.BooleanField(default=False)),
            ],
        ),
        migrations.AddField(
            model_name='project',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='assets.User'),
        ),
        migrations.AddField(
            model_name='ipaddress',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='assets.User'),
        ),
        migrations.AddField(
            model_name='instance',
            name='cluster',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='assets.Project'),
        ),
        migrations.AddField(
            model_name='instance',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='assets.User'),
        ),
        migrations.AddField(
            model_name='instance',
            name='primary_ip',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='assets.IPAddress'),
        ),
    ]
