# Generated by Django 2.2 on 2019-04-26 14:01

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import isc_common.fields.code_field
import isc_common.fields.description_field
import isc_common.fields.name_field
import isc_common.fields.related


class Migration(migrations.Migration):

    dependencies = [
        ('production', '0014_operations_plan_refs'),
    ]

    operations = [
        migrations.CreateModel(
            name='Operations_plan_view',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False, verbose_name='Идентификатор')),
                ('id_old', models.BigIntegerField(blank=True, null=True, verbose_name='Идентификатор старый')),
                ('deleted_at', models.DateTimeField(blank=True, db_index=True, null=True, verbose_name='Дата мягкого удаления')),
                ('editing', models.BooleanField(default=True, verbose_name='Возможность редактирования')),
                ('deliting', models.BooleanField(default=True, verbose_name='Возможность удаления')),
                ('lastmodified', models.DateTimeField(db_index=True, default=django.utils.timezone.now, editable=False, verbose_name='Последнее обновление')),
                ('startdate', models.DateTimeField(db_index=True, default=None, verbose_name='Дата начала')),
                ('isFolder', models.BooleanField()),
            ],
            options={
                'verbose_name': 'Операции планировая',
                'db_table': 'production_operationsplan_view',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='Temp_production_operationsplan',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False, verbose_name='Идентификатор')),
                ('id_old', models.BigIntegerField(blank=True, null=True, verbose_name='Идентификатор старый')),
                ('deleted_at', models.DateTimeField(blank=True, db_index=True, null=True, verbose_name='Дата мягкого удаления')),
                ('editing', models.BooleanField(default=True, verbose_name='Возможность редактирования')),
                ('deliting', models.BooleanField(default=True, verbose_name='Возможность удаления')),
                ('lastmodified', models.DateTimeField(db_index=True, default=django.utils.timezone.now, editable=False, verbose_name='Последнее обновление')),
                ('qty', models.PositiveIntegerField()),
            ],
            options={
                'verbose_name': 'Временная таблица',
                'db_table': 'temp_production_operationsplan',
            },
        ),
        migrations.DeleteModel(
            name='TempProductionOperationsplan',
        ),
        migrations.AddField(
            model_name='operation_plan_templates',
            name='code',
            field=isc_common.fields.code_field.CodeField(unique=True),
        ),
        migrations.AddField(
            model_name='operation_plan_templates',
            name='description',
            field=isc_common.fields.description_field.DescriptionField(),
        ),
        migrations.AddField(
            model_name='operation_plan_templates',
            name='name',
            field=isc_common.fields.name_field.NameField(),
        ),
        migrations.AlterField(
            model_name='operationsplan',
            name='startdate',
            field=models.DateTimeField(db_index=True, default=None, verbose_name='Дата начала'),
        ),
        migrations.AddField(
            model_name='temp_production_operationsplan',
            name='operation_plan_templates',
            field=isc_common.fields.related.ForeignKeyProtect(on_delete=django.db.models.deletion.PROTECT, to='production.Operation_plan_templates'),
        ),
    ]
