# -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2017-08-18 01:02
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('simulation', '0014_finalfittingsetoptionsetquantity_finalfittingsetproductsetquantity'),
        ('order_contract', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='OptionQuantity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField()),
                ('option', models.ForeignKey(db_column='option', on_delete=django.db.models.deletion.CASCADE, to='simulation.Option')),
            ],
            options={
                'db_table': 'oc_option_quantity',
            },
        ),
        migrations.RenameField(
            model_name='ordercontract',
            old_name='product_quantity',
            new_name='order_main_fabric_set',
        ),
        migrations.AddField(
            model_name='optionquantity',
            name='order_contract',
            field=models.ForeignKey(db_column='order_contract', on_delete=django.db.models.deletion.CASCADE, to='order_contract.OrderContract'),
        ),
        migrations.AddField(
            model_name='ordercontract',
            name='order_option_set',
            field=models.ManyToManyField(through='order_contract.OptionQuantity', to='simulation.Option'),
        ),
    ]
