# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-08-09 20:35
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('control_produccion', '0009_order_order_date_created'),
    ]

    operations = [
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('process_group_sh_id', models.PositiveSmallIntegerField(unique=True)),
                ('process_group_name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Group_Process',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('group_process_is_started', models.BooleanField(default=False)),
                ('group_process_is_finished', models.BooleanField(default=False)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='control_produccion.Group')),
            ],
        ),
        migrations.CreateModel(
            name='Order_Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='control_produccion.Group', to_field='process_group_sh_id')),
            ],
        ),
        migrations.RemoveField(
            model_name='order_process',
            name='order',
        ),
        migrations.RemoveField(
            model_name='order_process',
            name='process',
        ),
        migrations.RemoveField(
            model_name='order',
            name='processes',
        ),
        migrations.RemoveField(
            model_name='process',
            name='process_group_sh_id',
        ),
        migrations.DeleteModel(
            name='Order_Process',
        ),
        migrations.AddField(
            model_name='order_group',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='control_produccion.Order'),
        ),
        migrations.AddField(
            model_name='group_process',
            name='process',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='control_produccion.Process'),
        ),
        migrations.AddField(
            model_name='group',
            name='processes',
            field=models.ManyToManyField(through='control_produccion.Group_Process', to='control_produccion.Process'),
        ),
        migrations.AddField(
            model_name='order',
            name='groups',
            field=models.ManyToManyField(through='control_produccion.Order_Group', to='control_produccion.Group'),
        ),
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-08-09 20:35
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('control_produccion', '0009_order_order_date_created'),
    ]

    operations = [
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('process_group_sh_id', models.PositiveSmallIntegerField(unique=True)),
                ('process_group_name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Group_Process',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('group_process_is_started', models.BooleanField(default=False)),
                ('group_process_is_finished', models.BooleanField(default=False)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='control_produccion.Group')),
            ],
        ),
        migrations.CreateModel(
            name='Order_Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='control_produccion.Group', to_field='process_group_sh_id')),
            ],
        ),
        migrations.RemoveField(
            model_name='order_process',
            name='order',
        ),
        migrations.RemoveField(
            model_name='order_process',
            name='process',
        ),
        migrations.RemoveField(
            model_name='order',
            name='processes',
        ),
        migrations.RemoveField(
            model_name='process',
            name='process_group_sh_id',
        ),
        migrations.DeleteModel(
            name='Order_Process',
        ),
        migrations.AddField(
            model_name='order_group',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='control_produccion.Order'),
        ),
        migrations.AddField(
            model_name='group_process',
            name='process',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='control_produccion.Process'),
        ),
        migrations.AddField(
            model_name='group',
            name='processes',
            field=models.ManyToManyField(through='control_produccion.Group_Process', to='control_produccion.Process'),
        ),
        migrations.AddField(
            model_name='order',
            name='groups',
            field=models.ManyToManyField(through='control_produccion.Order_Group', to='control_produccion.Group'),
        ),
    ]

# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-08-09 20:35