# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-03-17 02:21
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('tsadmhost', '0001_initial'),
        ('tsadmuser', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='SiteDB',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True)),
            ],
            options={
                'verbose_name': 'Site',
                'verbose_name_plural': 'Sites',
            },
        ),
        migrations.CreateModel(
            name='SiteEnvACL',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'verbose_name': 'SiteEnvACL',
                'verbose_name_plural': 'SiteEnvsACL',
            },
        ),
        migrations.CreateModel(
            name='SiteEnvDB',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
                ('host', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tsadmhost.HostDB')),
                ('site', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tsadmsite.SiteDB')),
                ('users', models.ManyToManyField(related_name='siteenv', through='tsadmsite.SiteEnvACL', to='tsadmuser.UserDB')),
            ],
            options={
                'verbose_name': 'SiteEnv',
                'verbose_name_plural': 'SiteEnvs',
            },
        ),
        migrations.AddField(
            model_name='siteenvacl',
            name='siteenv',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tsadmsite.SiteEnvDB'),
        ),
        migrations.AddField(
            model_name='siteenvacl',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tsadmuser.UserDB'),
        ),
    ]
