# Generated by Django 2.2.5 on 2020-03-16 17:00

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import simple_history.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Food',
            fields=[
                ('FOOD_C', models.AutoField(primary_key=True, serialize=False)),
                ('ENG_NAME', models.CharField(blank=True, max_length=500, null=True)),
                ('FR_NAME', models.CharField(blank=True, max_length=500, null=True)),
                ('FOOD_DESC', models.CharField(blank=True, max_length=500, null=True)),
                ('FOOD_DESC_F', models.CharField(blank=True, max_length=500, null=True)),
                ('NUT_CAN_C', models.IntegerField(blank=True, null=True)),
                ('CNF_FLAG', models.BooleanField(blank=True, null=True)),
                ('COUNTRY_C', models.IntegerField(blank=True, null=True)),
                ('COMMENT_T', models.CharField(blank=True, max_length=500, null=True)),
                ('FN_COMMENT_F', models.CharField(blank=True, max_length=500, null=True)),
                ('FOOD_REFERENCE', models.CharField(blank=True, max_length=500, null=True)),
                ('SCIENTIFIC_NAME', models.CharField(blank=True, max_length=500, null=True)),
                ('PUBLICATION_FLAG', models.BooleanField(blank=True, null=True)),
                ('PUBLICATION_CODE', models.CharField(blank=True, max_length=10, null=True)),
                ('ITEM_C', models.IntegerField(blank=True, null=True)),
                ('SEQUENCE_C', models.IntegerField(blank=True, null=True)),
                ('LEGACY_GROUP_C', models.IntegerField(blank=True, null=True)),
                ('COMMON_NM_E', models.CharField(blank=True, max_length=500, null=True)),
                ('COMMON_NM_F', models.CharField(blank=True, max_length=500, null=True)),
                ('FN_DB_SOURCE_C', models.IntegerField(blank=True, null=True)),
                ('FN_RECIPE_FLG', models.BooleanField(blank=True, null=True)),
                ('FN_SYSTEM_VIEW_C', models.IntegerField(blank=True, null=True)),
                ('FN_FAT_CHANGE', models.IntegerField(blank=True, null=True)),
                ('FN_MOISTURE_CHANGE', models.IntegerField(blank=True, null=True)),
                ('FN_SYS_USER_CREATE_C', models.IntegerField(blank=True, null=True)),
                ('FN_SYS_USER_EDIT_C', models.IntegerField(blank=True, null=True)),
                ('FN_TEMPLATE_C', models.IntegerField(blank=True, null=True)),
                ('FN_TEMP', models.IntegerField(blank=True, null=True)),
                ('FN_ARCHIVED', models.IntegerField(blank=True, null=True)),
                ('FN_LEGACY_C', models.CharField(blank=True, max_length=15, null=True)),
                ('US_RECIPE_C', models.IntegerField(blank=True, null=True)),
                ('USDA_MODIFIED', models.BooleanField(blank=True, null=True)),
                ('USDA_TEMP', models.CharField(blank=True, max_length=35, null=True)),
                ('CANADA_FOOD_SUBGROUP_ID', models.IntegerField(blank=True, null=True)),
                ('CFGHE_FLAG', models.IntegerField(blank=True, null=True)),
                ('ORIG_CANADA_FOOD_SUBGROUP_ID', models.IntegerField(blank=True, null=True)),
                ('FOOD_OWNER', models.IntegerField(blank=True, null=True)),
                ('SHARED_FOOD', models.BooleanField(blank=True, null=True)),
                ('CANDI_REC_NUM', models.IntegerField(blank=True, null=True)),
                ('INHERITANCE_FLAG', models.IntegerField(blank=True, null=True)),
                ('FOOD_CODE', models.IntegerField(blank=True, null=True)),
                ('DATE_ENTRY', models.DateTimeField(blank=True, null=True)),
                ('DATE_CHANGE', models.DateTimeField(blank=True, null=True)),
                ('DATE_END', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='FoodGroup',
            fields=[
                ('GROUP_C', models.AutoField(primary_key=True, serialize=False)),
                ('GROUP_DESC', models.CharField(blank=True, max_length=500, null=True)),
                ('GROUP_DESC_F', models.CharField(blank=True, max_length=500, null=True)),
                ('GROUP_CODE', models.IntegerField(blank=True, null=True)),
                ('FG_GROUP_ABBRV', models.CharField(blank=True, max_length=10, null=True)),
                ('GROUP_COMPOSITE_FLG', models.BooleanField(blank=True, null=True)),
                ('GROUP_RECIPE_FLG', models.BooleanField(blank=True, null=True)),
                ('FG_DB_SOURCE_C', models.BooleanField(blank=True, null=True)),
                ('FG_BBCA_INDEX', models.IntegerField(blank=True, null=True)),
                ('GROUP_OWNER', models.IntegerField(blank=True, null=True)),
                ('SHARED_GROUP', models.IntegerField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='FoodSource',
            fields=[
                ('SOURCE_C', models.AutoField(primary_key=True, serialize=False)),
                ('SOURCE_DESC', models.CharField(blank=True, max_length=500, null=True)),
                ('SOURCE_DESC_F', models.CharField(blank=True, max_length=500, null=True)),
                ('NRD_REF', models.IntegerField(blank=True, null=True)),
                ('SHARED_SOURCE', models.BooleanField(blank=True, null=True)),
                ('SOURCE_OWNER', models.IntegerField(blank=True, null=True)),
                ('SOURCE_CNF_OWNER', models.IntegerField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='MeasureType',
            fields=[
                ('M_TYPE_ID', models.AutoField(primary_key=True, serialize=False)),
                ('M_TYPE_DESC', models.CharField(blank=True, max_length=500, null=True)),
                ('M_TYPE_ABBRV', models.CharField(blank=True, max_length=500, null=True)),
                ('M_TYPE_USER_SELECTABLE', models.BooleanField(blank=True, null=True)),
                ('M_TYPE_DESC_F', models.CharField(blank=True, max_length=500, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Nutrient',
            fields=[
                ('NUTR_C', models.AutoField(primary_key=True, serialize=False)),
                ('NUTR_SYMBOL', models.CharField(blank=True, max_length=500, null=True)),
                ('NUTR_NAME', models.CharField(blank=True, max_length=500, null=True)),
                ('NUTR_NAME_F', models.CharField(blank=True, max_length=500, null=True)),
                ('UNIT', models.CharField(blank=True, max_length=100, null=True)),
                ('SEQUENCE_C', models.IntegerField(blank=True, null=True)),
                ('NUTR_CODE', models.IntegerField(blank=True, null=True)),
                ('NUTR_WEB', models.BooleanField(blank=True, null=True)),
                ('NUTR_ACTIVE_FLAG', models.BooleanField(blank=True, null=True)),
                ('NUTR_DECIMAL_PLACE', models.IntegerField(blank=True, null=True)),
                ('NUTR_WEB_ORDER', models.IntegerField(blank=True, null=True)),
                ('NUTRIENT_GROUP_ID', models.IntegerField(blank=True, null=True)),
                ('TAGNAME', models.CharField(blank=True, max_length=100, null=True)),
                ('NUTR_WEB_NAME_E', models.CharField(blank=True, max_length=100, null=True)),
                ('NUTR_WEB_NAME_F', models.CharField(blank=True, max_length=100, null=True)),
                ('PUBLICATION_CODE', models.CharField(blank=True, max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='NutrientReference',
            fields=[
                ('REF_C', models.AutoField(primary_key=True, serialize=False)),
                ('REF_DESC', models.CharField(blank=True, max_length=500, null=True)),
                ('REF_DESC_F', models.CharField(blank=True, max_length=500, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='NutrientSource',
            fields=[
                ('NUTR_SOURCE_C', models.AutoField(primary_key=True, serialize=False)),
                ('SOURCE_DESC', models.CharField(blank=True, max_length=500, null=True)),
                ('SOURCE_DESC_F', models.CharField(blank=True, max_length=500, null=True)),
                ('NRD_REF', models.IntegerField(blank=True, null=True)),
                ('PUBLICATION_CODE', models.CharField(blank=True, max_length=500, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='NutrientOfFood',
            fields=[
                ('NUTR_AMOUNT_C', models.AutoField(primary_key=True, serialize=False)),
                ('NUTR_VALUE', models.FloatField(blank=True, null=True)),
                ('STD_ERROR', models.FloatField(blank=True, null=True)),
                ('NUM_OBSER', models.IntegerField(blank=True, null=True)),
                ('METHOD_C', models.IntegerField(blank=True, null=True)),
                ('COMMENT_T', models.CharField(blank=True, max_length=500, null=True)),
                ('FLAG_TRACE', models.BooleanField(blank=True, null=True)),
                ('PUBLICATION_CODE', models.CharField(blank=True, max_length=500, null=True)),
                ('USDA_SOURCE', models.IntegerField(blank=True, null=True)),
                ('USDA_DERIV', models.IntegerField(blank=True, null=True)),
                ('FN_SYS_USER_CREATE_C', models.IntegerField(blank=True, null=True)),
                ('FN_SYS_USER_EDIT_C', models.IntegerField(blank=True, null=True)),
                ('DATE_ENTRY', models.DateTimeField(blank=True, null=True)),
                ('DATE_CHANGE', models.DateTimeField(blank=True, null=True)),
                ('DATE_END', models.DateTimeField(blank=True, null=True)),
                ('PENTAHO_CREATE_DATE', models.DateTimeField(blank=True, null=True)),
                ('FOOD', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Food')),
                ('NUTR', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Nutrient')),
                ('REF', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.NutrientReference')),
                ('SOURCE', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.NutrientSource')),
            ],
        ),
        migrations.CreateModel(
            name='Measure',
            fields=[
                ('MEASURE_ID', models.AutoField(primary_key=True, serialize=False)),
                ('MEASURE_DESC', models.CharField(blank=True, max_length=500, null=True)),
                ('MEASURE_DESC_F', models.CharField(blank=True, max_length=500, null=True)),
                ('MEASURE_ABBRV', models.CharField(blank=True, max_length=500, null=True)),
                ('MEASURE_ABBRV_F', models.CharField(blank=True, max_length=500, null=True)),
                ('MEASURE_OWNER', models.IntegerField(blank=True, null=True)),
                ('SHARED_MEASURE', models.BooleanField(blank=True, null=True)),
                ('PUBLICATION_CODE', models.CharField(blank=True, max_length=500, null=True)),
                ('M_TYPE', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.MeasureType')),
            ],
        ),
        migrations.CreateModel(
            name='HistoricalNutrientOfFood',
            fields=[
                ('NUTR_AMOUNT_C', models.IntegerField(blank=True, db_index=True)),
                ('NUTR_VALUE', models.FloatField(blank=True, null=True)),
                ('STD_ERROR', models.FloatField(blank=True, null=True)),
                ('NUM_OBSER', models.IntegerField(blank=True, null=True)),
                ('METHOD_C', models.IntegerField(blank=True, null=True)),
                ('COMMENT_T', models.CharField(blank=True, max_length=500, null=True)),
                ('FLAG_TRACE', models.BooleanField(blank=True, null=True)),
                ('PUBLICATION_CODE', models.CharField(blank=True, max_length=500, null=True)),
                ('USDA_SOURCE', models.IntegerField(blank=True, null=True)),
                ('USDA_DERIV', models.IntegerField(blank=True, null=True)),
                ('FN_SYS_USER_CREATE_C', models.IntegerField(blank=True, null=True)),
                ('FN_SYS_USER_EDIT_C', models.IntegerField(blank=True, null=True)),
                ('DATE_ENTRY', models.DateTimeField(blank=True, null=True)),
                ('DATE_CHANGE', models.DateTimeField(blank=True, null=True)),
                ('DATE_END', models.DateTimeField(blank=True, null=True)),
                ('PENTAHO_CREATE_DATE', models.DateTimeField(blank=True, null=True)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                ('FOOD', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='api.Food')),
                ('NUTR', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='api.Nutrient')),
                ('REF', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='api.NutrientReference')),
                ('SOURCE', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='api.NutrientSource')),
                ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical nutrient of food',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalNutrient',
            fields=[
                ('NUTR_C', models.IntegerField(blank=True, db_index=True)),
                ('NUTR_SYMBOL', models.CharField(blank=True, max_length=500, null=True)),
                ('NUTR_NAME', models.CharField(blank=True, max_length=500, null=True)),
                ('NUTR_NAME_F', models.CharField(blank=True, max_length=500, null=True)),
                ('UNIT', models.CharField(blank=True, max_length=100, null=True)),
                ('SEQUENCE_C', models.IntegerField(blank=True, null=True)),
                ('NUTR_CODE', models.IntegerField(blank=True, null=True)),
                ('NUTR_WEB', models.BooleanField(blank=True, null=True)),
                ('NUTR_ACTIVE_FLAG', models.BooleanField(blank=True, null=True)),
                ('NUTR_DECIMAL_PLACE', models.IntegerField(blank=True, null=True)),
                ('NUTR_WEB_ORDER', models.IntegerField(blank=True, null=True)),
                ('NUTRIENT_GROUP_ID', models.IntegerField(blank=True, null=True)),
                ('TAGNAME', models.CharField(blank=True, max_length=100, null=True)),
                ('NUTR_WEB_NAME_E', models.CharField(blank=True, max_length=100, null=True)),
                ('NUTR_WEB_NAME_F', models.CharField(blank=True, max_length=100, null=True)),
                ('PUBLICATION_CODE', models.CharField(blank=True, max_length=100, null=True)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical nutrient',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalFoodSource',
            fields=[
                ('SOURCE_C', models.IntegerField(blank=True, db_index=True)),
                ('SOURCE_DESC', models.CharField(blank=True, max_length=500, null=True)),
                ('SOURCE_DESC_F', models.CharField(blank=True, max_length=500, null=True)),
                ('NRD_REF', models.IntegerField(blank=True, null=True)),
                ('SHARED_SOURCE', models.BooleanField(blank=True, null=True)),
                ('SOURCE_OWNER', models.IntegerField(blank=True, null=True)),
                ('SOURCE_CNF_OWNER', models.IntegerField(blank=True, null=True)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical food source',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalFoodGroup',
            fields=[
                ('GROUP_C', models.IntegerField(blank=True, db_index=True)),
                ('GROUP_DESC', models.CharField(blank=True, max_length=500, null=True)),
                ('GROUP_DESC_F', models.CharField(blank=True, max_length=500, null=True)),
                ('GROUP_CODE', models.IntegerField(blank=True, null=True)),
                ('FG_GROUP_ABBRV', models.CharField(blank=True, max_length=10, null=True)),
                ('GROUP_COMPOSITE_FLG', models.BooleanField(blank=True, null=True)),
                ('GROUP_RECIPE_FLG', models.BooleanField(blank=True, null=True)),
                ('FG_DB_SOURCE_C', models.BooleanField(blank=True, null=True)),
                ('FG_BBCA_INDEX', models.IntegerField(blank=True, null=True)),
                ('GROUP_OWNER', models.IntegerField(blank=True, null=True)),
                ('SHARED_GROUP', models.IntegerField(blank=True, null=True)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical food group',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalFood',
            fields=[
                ('FOOD_C', models.IntegerField(blank=True, db_index=True)),
                ('ENG_NAME', models.CharField(blank=True, max_length=500, null=True)),
                ('FR_NAME', models.CharField(blank=True, max_length=500, null=True)),
                ('FOOD_DESC', models.CharField(blank=True, max_length=500, null=True)),
                ('FOOD_DESC_F', models.CharField(blank=True, max_length=500, null=True)),
                ('NUT_CAN_C', models.IntegerField(blank=True, null=True)),
                ('CNF_FLAG', models.BooleanField(blank=True, null=True)),
                ('COUNTRY_C', models.IntegerField(blank=True, null=True)),
                ('COMMENT_T', models.CharField(blank=True, max_length=500, null=True)),
                ('FN_COMMENT_F', models.CharField(blank=True, max_length=500, null=True)),
                ('FOOD_REFERENCE', models.CharField(blank=True, max_length=500, null=True)),
                ('SCIENTIFIC_NAME', models.CharField(blank=True, max_length=500, null=True)),
                ('PUBLICATION_FLAG', models.BooleanField(blank=True, null=True)),
                ('PUBLICATION_CODE', models.CharField(blank=True, max_length=10, null=True)),
                ('ITEM_C', models.IntegerField(blank=True, null=True)),
                ('SEQUENCE_C', models.IntegerField(blank=True, null=True)),
                ('LEGACY_GROUP_C', models.IntegerField(blank=True, null=True)),
                ('COMMON_NM_E', models.CharField(blank=True, max_length=500, null=True)),
                ('COMMON_NM_F', models.CharField(blank=True, max_length=500, null=True)),
                ('FN_DB_SOURCE_C', models.IntegerField(blank=True, null=True)),
                ('FN_RECIPE_FLG', models.BooleanField(blank=True, null=True)),
                ('FN_SYSTEM_VIEW_C', models.IntegerField(blank=True, null=True)),
                ('FN_FAT_CHANGE', models.IntegerField(blank=True, null=True)),
                ('FN_MOISTURE_CHANGE', models.IntegerField(blank=True, null=True)),
                ('FN_SYS_USER_CREATE_C', models.IntegerField(blank=True, null=True)),
                ('FN_SYS_USER_EDIT_C', models.IntegerField(blank=True, null=True)),
                ('FN_TEMPLATE_C', models.IntegerField(blank=True, null=True)),
                ('FN_TEMP', models.IntegerField(blank=True, null=True)),
                ('FN_ARCHIVED', models.IntegerField(blank=True, null=True)),
                ('FN_LEGACY_C', models.CharField(blank=True, max_length=15, null=True)),
                ('US_RECIPE_C', models.IntegerField(blank=True, null=True)),
                ('USDA_MODIFIED', models.BooleanField(blank=True, null=True)),
                ('USDA_TEMP', models.CharField(blank=True, max_length=35, null=True)),
                ('CANADA_FOOD_SUBGROUP_ID', models.IntegerField(blank=True, null=True)),
                ('CFGHE_FLAG', models.IntegerField(blank=True, null=True)),
                ('ORIG_CANADA_FOOD_SUBGROUP_ID', models.IntegerField(blank=True, null=True)),
                ('FOOD_OWNER', models.IntegerField(blank=True, null=True)),
                ('SHARED_FOOD', models.BooleanField(blank=True, null=True)),
                ('CANDI_REC_NUM', models.IntegerField(blank=True, null=True)),
                ('INHERITANCE_FLAG', models.IntegerField(blank=True, null=True)),
                ('FOOD_CODE', models.IntegerField(blank=True, null=True)),
                ('DATE_ENTRY', models.DateTimeField(blank=True, null=True)),
                ('DATE_CHANGE', models.DateTimeField(blank=True, null=True)),
                ('DATE_END', models.DateTimeField(blank=True, null=True)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                ('GROUP', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='api.FoodGroup')),
                ('SOURCE', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='api.FoodSource')),
                ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical food',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalConversionFactor',
            fields=[
                ('CF_FACTOR_C', models.IntegerField(blank=True, db_index=True)),
                ('CONV_FACTOR', models.FloatField(blank=True, null=True)),
                ('COMMENT_T', models.CharField(blank=True, max_length=500, null=True)),
                ('CF_COMMENT_F', models.CharField(blank=True, max_length=500, null=True)),
                ('FLAG_CFG', models.BooleanField(blank=True, null=True)),
                ('NO_SERVING', models.IntegerField(blank=True, null=True)),
                ('VALID_NULL_CF', models.IntegerField(blank=True, null=True)),
                ('CF_REF_ID', models.IntegerField(blank=True, null=True)),
                ('PUBLICATION_CODE', models.CharField(blank=True, max_length=25, null=True)),
                ('SEQ_WEB', models.IntegerField(blank=True, null=True)),
                ('FLAG_REFERENCE_AMOUNT', models.BooleanField(blank=True, null=True)),
                ('SHOW_SERVING_SIZE', models.BooleanField(blank=True, null=True)),
                ('CF_OWNER', models.IntegerField(blank=True, null=True)),
                ('SHARED_CF', models.BooleanField(blank=True, null=True)),
                ('FLAG_REPORT', models.BooleanField(blank=True, null=True)),
                ('FN_SYS_USER_CREATE_C', models.IntegerField(blank=True, null=True)),
                ('FN_SYS_USER_EDIT_C', models.IntegerField(blank=True, null=True)),
                ('PUBLICATION_FLAG', models.BooleanField(blank=True, null=True)),
                ('DATE_ENTRY', models.DateTimeField(blank=True, null=True)),
                ('DATE_END', models.DateTimeField(blank=True, null=True)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                ('FOOD_C', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='api.Food')),
                ('MEASURE_ID', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='api.Measure')),
                ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical conversion factor',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.AddField(
            model_name='food',
            name='GROUP',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='api.FoodGroup'),
        ),
        migrations.AddField(
            model_name='food',
            name='SOURCE',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='api.FoodSource'),
        ),
        migrations.CreateModel(
            name='ConversionFactor',
            fields=[
                ('CF_FACTOR_C', models.AutoField(primary_key=True, serialize=False)),
                ('CONV_FACTOR', models.FloatField(blank=True, null=True)),
                ('COMMENT_T', models.CharField(blank=True, max_length=500, null=True)),
                ('CF_COMMENT_F', models.CharField(blank=True, max_length=500, null=True)),
                ('FLAG_CFG', models.BooleanField(blank=True, null=True)),
                ('NO_SERVING', models.IntegerField(blank=True, null=True)),
                ('VALID_NULL_CF', models.IntegerField(blank=True, null=True)),
                ('CF_REF_ID', models.IntegerField(blank=True, null=True)),
                ('PUBLICATION_CODE', models.CharField(blank=True, max_length=25, null=True)),
                ('SEQ_WEB', models.IntegerField(blank=True, null=True)),
                ('FLAG_REFERENCE_AMOUNT', models.BooleanField(blank=True, null=True)),
                ('SHOW_SERVING_SIZE', models.BooleanField(blank=True, null=True)),
                ('CF_OWNER', models.IntegerField(blank=True, null=True)),
                ('SHARED_CF', models.BooleanField(blank=True, null=True)),
                ('FLAG_REPORT', models.BooleanField(blank=True, null=True)),
                ('FN_SYS_USER_CREATE_C', models.IntegerField(blank=True, null=True)),
                ('FN_SYS_USER_EDIT_C', models.IntegerField(blank=True, null=True)),
                ('PUBLICATION_FLAG', models.BooleanField(blank=True, null=True)),
                ('DATE_ENTRY', models.DateTimeField(blank=True, null=True)),
                ('DATE_END', models.DateTimeField(blank=True, null=True)),
                ('FOOD_C', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Food')),
                ('MEASURE_ID', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Measure')),
            ],
        ),
    ]
