# Generated by Django 2.2.3 on 2019-08-02 05:46

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('name', models.TextField()),
                ('user_created', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_category_related_UserCreated', to=settings.AUTH_USER_MODEL)),
                ('user_last_modified', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_category_related_UserLastModified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Competency',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('name', models.TextField()),
                ('description', models.TextField()),
                ('definition', models.TextField()),
                ('essential_knoweledge', models.TextField()),
                ('optional_knoweledge', models.TextField()),
                ('competency', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='compotencySelfReference', to='competency.Competency')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CompQuestion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('question', models.TextField()),
                ('description', models.TextField()),
                ('competency', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.Competency')),
                ('user_created', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_compquestion_related_UserCreated', to=settings.AUTH_USER_MODEL)),
                ('user_last_modified', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_compquestion_related_UserLastModified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('name', models.TextField()),
                ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('tag', models.TextField()),
                ('user_created', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_tag_related_UserCreated', to=settings.AUTH_USER_MODEL)),
                ('user_last_modified', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_tag_related_UserLastModified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SubjectType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('_type', models.TextField()),
                ('user_created', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_subjecttype_related_UserCreated', to=settings.AUTH_USER_MODEL)),
                ('user_last_modified', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_subjecttype_related_UserLastModified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('name', models.TextField()),
                ('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.Organization')),
                ('subject_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.SubjectType')),
                ('user_created', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_subject_related_UserCreated', to=settings.AUTH_USER_MODEL)),
                ('user_last_modified', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_subject_related_UserLastModified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Subcategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('name', models.TextField()),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.Category')),
                ('user_created', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_subcategory_related_UserCreated', to=settings.AUTH_USER_MODEL)),
                ('user_last_modified', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_subcategory_related_UserLastModified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PredefinedAnswer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('answer', models.TextField()),
                ('comp_question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.CompQuestion')),
                ('user_created', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_predefinedanswer_related_UserCreated', to=settings.AUTH_USER_MODEL)),
                ('user_last_modified', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_predefinedanswer_related_UserLastModified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='OrganizationType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('_type', models.TextField()),
                ('user_created', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_organizationtype_related_UserCreated', to=settings.AUTH_USER_MODEL)),
                ('user_last_modified', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_organizationtype_related_UserLastModified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='organization',
            name='organization_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.OrganizationType'),
        ),
        migrations.AddField(
            model_name='organization',
            name='user_created',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_organization_related_UserCreated', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='organization',
            name='user_last_modified',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_organization_related_UserLastModified', to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='EvaluationType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('_type', models.TextField()),
                ('user_created', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_evaluationtype_related_UserCreated', to=settings.AUTH_USER_MODEL)),
                ('user_last_modified', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_evaluationtype_related_UserLastModified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Evaluation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('comment', models.TextField()),
                ('evaluation_date', models.DateField()),
                ('evaluation_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.EvaluationType')),
                ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.Subject')),
                ('user_created', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_evaluation_related_UserCreated', to=settings.AUTH_USER_MODEL)),
                ('user_last_modified', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_evaluation_related_UserLastModified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Estimate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('estimate_date', models.DateField()),
                ('term_start', models.DateField()),
                ('term_end', models.DateField()),
                ('evaluation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.Evaluation')),
                ('user_created', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_estimate_related_UserCreated', to=settings.AUTH_USER_MODEL)),
                ('user_last_modified', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_estimate_related_UserLastModified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CompTags',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('competency', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.Competency')),
                ('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.Tag')),
                ('user_created', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_comptags_related_UserCreated', to=settings.AUTH_USER_MODEL)),
                ('user_last_modified', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_comptags_related_UserLastModified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CompRating',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('tier', models.SmallIntegerField()),
                ('name', models.TextField()),
                ('competency', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.Competency')),
                ('evaluation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.Evaluation')),
                ('user_created', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_comprating_related_UserCreated', to=settings.AUTH_USER_MODEL)),
                ('user_last_modified', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_comprating_related_UserLastModified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='competency',
            name='organization',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.Organization'),
        ),
        migrations.AddField(
            model_name='competency',
            name='subcategory',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.Subcategory'),
        ),
        migrations.AddField(
            model_name='competency',
            name='user_created',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_competency_related_UserCreated', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='competency',
            name='user_last_modified',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_competency_related_UserLastModified', to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='Answer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_last_modified', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField()),
                ('is_locked', models.BooleanField()),
                ('comment', models.TextField()),
                ('comp_question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.CompQuestion')),
                ('evaluation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competency.Evaluation')),
                ('predefined_answer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='PredefinedAnswerFK', to='competency.PredefinedAnswer')),
                ('user_created', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_answer_related_UserCreated', to=settings.AUTH_USER_MODEL)),
                ('user_last_modified', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='competency_answer_related_UserLastModified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
