# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-01-24 10:53
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Pillar',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID')),
                ('pillar_name', models.CharField(default='', max_length=128, verbose_name='pillar名称')),
                ('pillar_value', models.TextField(default='', verbose_name='pillar值')),
                ('environment', models.CharField(default='', max_length=128, verbose_name='环境标签')),
            ],
        ),
        migrations.RenameField(
            model_name='node',
            old_name='instances',
            new_name='installed_instances',
        ),
        migrations.RemoveField(
            model_name='instance',
            name='env_tag',
        ),
        migrations.RemoveField(
            model_name='instance',
            name='include_instances',
        ),
        migrations.RemoveField(
            model_name='instance',
            name='pillar',
        ),
        migrations.AddField(
            model_name='instance',
            name='included_instances',
            field=models.ManyToManyField(related_name='_instance_included_instances_+', to='geniusalt.Instance'),
        ),
        migrations.AddField(
            model_name='node',
            name='installed_modules',
            field=models.ManyToManyField(to='geniusalt.Module'),
        ),
        migrations.AddField(
            model_name='node',
            name='is_lock',
            field=models.IntegerField(choices=[(0, '否'), (1, '是')], default='0', verbose_name='是否锁定'),
        ),
        migrations.AlterField(
            model_name='instance',
            name='name',
            field=models.CharField(default='', max_length=128, unique=True, verbose_name='子模块名称'),
        ),
        migrations.AddField(
            model_name='pillar',
            name='instance_belong',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pillars', to='geniusalt.Instance'),
        ),
    ]
