# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-15 12:15
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AEDependencies',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('help_text', models.CharField(blank=True, max_length=100, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Assessment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
                ('date_created', models.DateField(auto_now=True)),
                ('considerations', models.TextField()),
                ('organizational_score', models.DecimalField(decimal_places=2, default=0, max_digits=15)),
                ('physical_score', models.DecimalField(decimal_places=2, default=0, max_digits=15)),
                ('functional_score', models.DecimalField(decimal_places=2, default=0, max_digits=15)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentElement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('enabled', models.BooleanField(default=True)),
                ('assessment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentElementHazardImpact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('a_element', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentElement')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentElementImpactType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentHazardCause',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentHazardConsequence',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentHazardSubtype',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('enabled', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentHazardType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('risk_assessment', models.CharField(blank=True, max_length=50, null=True)),
                ('r_a_year', models.CharField(blank=True, max_length=50, null=True)),
                ('contingency_plan', models.CharField(blank=True, max_length=50, null=True)),
                ('c_p_year', models.CharField(blank=True, max_length=50, null=True)),
                ('subtypes', models.CharField(blank=True, max_length=250, null=True)),
                ('enabled', models.BooleanField(default=False)),
                ('assessment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentQuestion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('response', models.CharField(blank=True, max_length=500, null=True)),
                ('assessment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment')),
                ('assessment_element', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentElement')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentStakeholder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
                ('assessment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment')),
                ('element', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentElement')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentVersion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('version', models.CharField(max_length=25)),
                ('name', models.CharField(blank=True, max_length=250, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('date_released', models.DateField(default=django.utils.timezone.now)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DependencyType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Element',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=20)),
                ('name', models.CharField(max_length=250)),
                ('note', models.CharField(blank=True, max_length=250, null=True)),
                ('address', models.CharField(blank=True, max_length=250, null=True)),
                ('order', models.IntegerField(blank=True, null=True)),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Element')),
                ('version', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentVersion')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HazardGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=20, unique=True)),
                ('name', models.CharField(max_length=250)),
                ('note', models.CharField(blank=True, max_length=250, null=True)),
                ('address', models.CharField(blank=True, max_length=250, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HazardSubtype',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=20, unique=True)),
                ('name', models.CharField(max_length=250)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HazardSubtypeDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=20, unique=True)),
                ('name', models.CharField(max_length=250)),
                ('hazard_subtype', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.HazardSubtype')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HazardType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=20, unique=True)),
                ('name', models.CharField(max_length=250)),
                ('description', models.CharField(blank=True, max_length=800, null=True)),
                ('hazard_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.HazardGroup')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MoVType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='QuestionSimple',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question_short', models.CharField(blank=True, max_length=150, null=True)),
                ('question_long', models.CharField(blank=True, max_length=500, null=True)),
                ('help_text', models.CharField(blank=True, max_length=500, null=True)),
                ('placeholder', models.CharField(blank=True, max_length=250, null=True)),
                ('order', models.IntegerField(blank=True, null=True)),
                ('choices', models.CharField(blank=True, max_length=50, null=True)),
                ('multi', models.BooleanField(default=False)),
                ('question_type', models.CharField(blank=True, max_length=25, null=True)),
                ('version', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentVersion')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='StakeholderElementRelationshipType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='StakeholderGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=250, unique=True)),
                ('name', models.CharField(max_length=250)),
                ('description', models.CharField(blank=True, max_length=500, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='StakeholderLGRelationshipType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='StakeholderType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=250, unique=True)),
                ('name', models.CharField(max_length=250)),
                ('stakeholder_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.StakeholderGroup')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ValueType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='hazardsubtype',
            name='hazard_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.HazardType'),
        ),
        migrations.AddField(
            model_name='assessmentstakeholder',
            name='element_rel_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.StakeholderElementRelationshipType'),
        ),
        migrations.AddField(
            model_name='assessmentstakeholder',
            name='from_lg_rel_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='from_lg_rel_type', to='bcn_rp.StakeholderLGRelationshipType'),
        ),
        migrations.AddField(
            model_name='assessmentstakeholder',
            name='stakeholder_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.StakeholderType'),
        ),
        migrations.AddField(
            model_name='assessmentstakeholder',
            name='to_lg_rel_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='to_lg_rel_type', to='bcn_rp.StakeholderLGRelationshipType'),
        ),
        migrations.AddField(
            model_name='assessmentquestion',
            name='mov_type',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.MoVType'),
        ),
        migrations.AddField(
            model_name='assessmentquestion',
            name='question',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.QuestionSimple'),
        ),
        migrations.AddField(
            model_name='assessmenthazardtype',
            name='hazard_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.HazardType'),
        ),
        migrations.AddField(
            model_name='assessmenthazardsubtype',
            name='a_h_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentHazardType'),
        ),
        migrations.AddField(
            model_name='assessmenthazardsubtype',
            name='assessment',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment'),
        ),
        migrations.AddField(
            model_name='assessmenthazardsubtype',
            name='h_subtype',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.HazardSubtype'),
        ),
        migrations.AddField(
            model_name='assessmenthazardconsequence',
            name='a_h_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentHazardType'),
        ),
        migrations.AddField(
            model_name='assessmenthazardconsequence',
            name='a_h_type_consequence',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ht_consequence', to='bcn_rp.AssessmentHazardType'),
        ),
        migrations.AddField(
            model_name='assessmenthazardconsequence',
            name='assessment',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment'),
        ),
        migrations.AddField(
            model_name='assessmenthazardcause',
            name='a_h_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentHazardType'),
        ),
        migrations.AddField(
            model_name='assessmenthazardcause',
            name='a_h_type_cause',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ht_cause', to='bcn_rp.AssessmentHazardType'),
        ),
        migrations.AddField(
            model_name='assessmenthazardcause',
            name='assessment',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment'),
        ),
        migrations.AddField(
            model_name='assessmentelementhazardimpact',
            name='a_h_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentHazardType'),
        ),
        migrations.AddField(
            model_name='assessmentelementhazardimpact',
            name='assessment',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment'),
        ),
        migrations.AddField(
            model_name='assessmentelementhazardimpact',
            name='impact_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentElementImpactType'),
        ),
        migrations.AddField(
            model_name='assessmentelement',
            name='element',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Element'),
        ),
        migrations.AddField(
            model_name='assessment',
            name='status',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentStatus'),
        ),
        migrations.AddField(
            model_name='assessment',
            name='version',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentVersion'),
        ),
        migrations.AddField(
            model_name='aedependencies',
            name='ae_dependent',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='element_dependant', to='bcn_rp.AssessmentElement'),
        ),
        migrations.AddField(
            model_name='aedependencies',
            name='ae_origin',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='element_origin', to='bcn_rp.AssessmentElement'),
        ),
        migrations.AddField(
            model_name='aedependencies',
            name='dependency_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.DependencyType'),
        ),
    ]

356eb3dfa127660f43030dd430d59789e581837e
<mask token>

<mask token>


class Migration(migrations.Migration):
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Migration(migrations.Migration):
    initial = True
    dependencies = []
    operations = [migrations.CreateModel(name='AEDependencies', fields=[(
        'id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('help_text', models.
        CharField(blank=True, max_length=100, null=True))], options={
        'abstract': False}), migrations.CreateModel(name='Assessment',
        fields=[('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('name', models.CharField(
        max_length=250, unique=True)), ('date_created', models.DateField(
        auto_now=True)), ('considerations', models.TextField()), (
        'organizational_score', models.DecimalField(decimal_places=2,
        default=0, max_digits=15)), ('physical_score', models.DecimalField(
        decimal_places=2, default=0, max_digits=15)), ('functional_score',
        models.DecimalField(decimal_places=2, default=0, max_digits=15))],
        options={'abstract': False}), migrations.CreateModel(name=
        'AssessmentElement', fields=[('id', models.AutoField(auto_created=
        True, primary_key=True, serialize=False, verbose_name='ID')), (
        'enabled', models.BooleanField(default=True)), ('assessment',
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.Assessment'))], options={'abstract': False}), migrations.
        CreateModel(name='AssessmentElementHazardImpact', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('a_element', models.ForeignKey(
        on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentElement'))], options={'abstract': False}),
        migrations.CreateModel(name='AssessmentElementImpactType', fields=[
        ('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('name', models.CharField(
        max_length=250, unique=True))], options={'abstract': False}),
        migrations.CreateModel(name='AssessmentHazardCause', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID'))], options={'abstract': False}),
        migrations.CreateModel(name='AssessmentHazardConsequence', fields=[
        ('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID'))], options={'abstract': False}),
        migrations.CreateModel(name='AssessmentHazardSubtype', fields=[(
        'id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('enabled', models.
        BooleanField(default=False))], options={'abstract': False}),
        migrations.CreateModel(name='AssessmentHazardType', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('risk_assessment', models.CharField(
        blank=True, max_length=50, null=True)), ('r_a_year', models.
        CharField(blank=True, max_length=50, null=True)), (
        'contingency_plan', models.CharField(blank=True, max_length=50,
        null=True)), ('c_p_year', models.CharField(blank=True, max_length=
        50, null=True)), ('subtypes', models.CharField(blank=True,
        max_length=250, null=True)), ('enabled', models.BooleanField(
        default=False)), ('assessment', models.ForeignKey(on_delete=django.
        db.models.deletion.CASCADE, to='bcn_rp.Assessment'))], options={
        'abstract': False}), migrations.CreateModel(name=
        'AssessmentQuestion', fields=[('id', models.AutoField(auto_created=
        True, primary_key=True, serialize=False, verbose_name='ID')), (
        'response', models.CharField(blank=True, max_length=500, null=True)
        ), ('assessment', models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, to='bcn_rp.Assessment')), ('assessment_element',
        models.ForeignKey(blank=True, null=True, on_delete=django.db.models
        .deletion.CASCADE, to='bcn_rp.AssessmentElement'))], options={
        'abstract': False}), migrations.CreateModel(name=
        'AssessmentStakeholder', fields=[('id', models.AutoField(
        auto_created=True, primary_key=True, serialize=False, verbose_name=
        'ID')), ('name', models.CharField(max_length=250, unique=True)), (
        'assessment', models.ForeignKey(on_delete=django.db.models.deletion
        .CASCADE, to='bcn_rp.Assessment')), ('element', models.ForeignKey(
        on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentElement'))], options={'abstract': False}),
        migrations.CreateModel(name='AssessmentStatus', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('name', models.CharField(max_length=
        250, unique=True))], options={'abstract': False}), migrations.
        CreateModel(name='AssessmentVersion', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('version', models.CharField(max_length=25)),
        ('name', models.CharField(blank=True, max_length=250, null=True)),
        ('description', models.TextField(blank=True, null=True)), (
        'date_released', models.DateField(default=django.utils.timezone.now
        ))], options={'abstract': False}), migrations.CreateModel(name=
        'DependencyType', fields=[('id', models.AutoField(auto_created=True,
        primary_key=True, serialize=False, verbose_name='ID')), ('name',
        models.CharField(max_length=250, unique=True))], options={
        'abstract': False}), migrations.CreateModel(name='Element', fields=
        [('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('code', models.CharField(
        max_length=20)), ('name', models.CharField(max_length=250)), (
        'note', models.CharField(blank=True, max_length=250, null=True)), (
        'address', models.CharField(blank=True, max_length=250, null=True)),
        ('order', models.IntegerField(blank=True, null=True)), ('parent',
        models.ForeignKey(blank=True, null=True, on_delete=django.db.models
        .deletion.CASCADE, to='bcn_rp.Element')), ('version', models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentVersion'))], options={'abstract': False}),
        migrations.CreateModel(name='HazardGroup', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('code', models.CharField(max_length=20,
        unique=True)), ('name', models.CharField(max_length=250)), ('note',
        models.CharField(blank=True, max_length=250, null=True)), (
        'address', models.CharField(blank=True, max_length=250, null=True))
        ], options={'abstract': False}), migrations.CreateModel(name=
        'HazardSubtype', fields=[('id', models.AutoField(auto_created=True,
        primary_key=True, serialize=False, verbose_name='ID')), ('code',
        models.CharField(max_length=20, unique=True)), ('name', models.
        CharField(max_length=250))], options={'abstract': False}),
        migrations.CreateModel(name='HazardSubtypeDetail', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('code', models.CharField(max_length=20,
        unique=True)), ('name', models.CharField(max_length=250)), (
        'hazard_subtype', models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, to='bcn_rp.HazardSubtype'))], options={'abstract':
        False}), migrations.CreateModel(name='HazardType', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('code', models.CharField(max_length=20,
        unique=True)), ('name', models.CharField(max_length=250)), (
        'description', models.CharField(blank=True, max_length=800, null=
        True)), ('hazard_group', models.ForeignKey(on_delete=django.db.
        models.deletion.CASCADE, to='bcn_rp.HazardGroup'))], options={
        'abstract': False}), migrations.CreateModel(name='MoVType', fields=
        [('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('name', models.CharField(
        max_length=250, unique=True))], options={'abstract': False}),
        migrations.CreateModel(name='QuestionSimple', fields=[('id', models
        .AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('question_short', models.CharField(blank=True,
        max_length=150, null=True)), ('question_long', models.CharField(
        blank=True, max_length=500, null=True)), ('help_text', models.
        CharField(blank=True, max_length=500, null=True)), ('placeholder',
        models.CharField(blank=True, max_length=250, null=True)), ('order',
        models.IntegerField(blank=True, null=True)), ('choices', models.
        CharField(blank=True, max_length=50, null=True)), ('multi', models.
        BooleanField(default=False)), ('question_type', models.CharField(
        blank=True, max_length=25, null=True)), ('version', models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentVersion'))], options={'abstract': False}),
        migrations.CreateModel(name='StakeholderElementRelationshipType',
        fields=[('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('name', models.CharField(
        max_length=250, unique=True))], options={'abstract': False}),
        migrations.CreateModel(name='StakeholderGroup', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('code', models.CharField(max_length=
        250, unique=True)), ('name', models.CharField(max_length=250)), (
        'description', models.CharField(blank=True, max_length=500, null=
        True))], options={'abstract': False}), migrations.CreateModel(name=
        'StakeholderLGRelationshipType', fields=[('id', models.AutoField(
        auto_created=True, primary_key=True, serialize=False, verbose_name=
        'ID')), ('name', models.CharField(max_length=250, unique=True))],
        options={'abstract': False}), migrations.CreateModel(name=
        'StakeholderType', fields=[('id', models.AutoField(auto_created=
        True, primary_key=True, serialize=False, verbose_name='ID')), (
        'code', models.CharField(max_length=250, unique=True)), ('name',
        models.CharField(max_length=250)), ('stakeholder_group', models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.StakeholderGroup'))], options={'abstract': False}),
        migrations.CreateModel(name='ValueType', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('name', models.CharField(max_length=250,
        unique=True))], options={'abstract': False}), migrations.AddField(
        model_name='hazardsubtype', name='hazard_type', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.HazardType')), migrations.AddField(model_name=
        'assessmentstakeholder', name='element_rel_type', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.StakeholderElementRelationshipType')), migrations.AddField(
        model_name='assessmentstakeholder', name='from_lg_rel_type', field=
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='from_lg_rel_type', to=
        'bcn_rp.StakeholderLGRelationshipType')), migrations.AddField(
        model_name='assessmentstakeholder', name='stakeholder_type', field=
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.StakeholderType')), migrations.AddField(model_name=
        'assessmentstakeholder', name='to_lg_rel_type', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='to_lg_rel_type', to=
        'bcn_rp.StakeholderLGRelationshipType')), migrations.AddField(
        model_name='assessmentquestion', name='mov_type', field=models.
        ForeignKey(blank=True, null=True, on_delete=django.db.models.
        deletion.CASCADE, to='bcn_rp.MoVType')), migrations.AddField(
        model_name='assessmentquestion', name='question', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.QuestionSimple')), migrations.AddField(model_name=
        'assessmenthazardtype', name='hazard_type', field=models.ForeignKey
        (on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.HazardType')), migrations.AddField(model_name=
        'assessmenthazardsubtype', name='a_h_type', field=models.ForeignKey
        (on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentHazardType')), migrations.AddField(model_name=
        'assessmenthazardsubtype', name='assessment', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.Assessment')), migrations.AddField(model_name=
        'assessmenthazardsubtype', name='h_subtype', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.HazardSubtype')), migrations.AddField(model_name=
        'assessmenthazardconsequence', name='a_h_type', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentHazardType')), migrations.AddField(model_name=
        'assessmenthazardconsequence', name='a_h_type_consequence', field=
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='ht_consequence', to='bcn_rp.AssessmentHazardType')),
        migrations.AddField(model_name='assessmenthazardconsequence', name=
        'assessment', field=models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, to='bcn_rp.Assessment')), migrations.AddField(
        model_name='assessmenthazardcause', name='a_h_type', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentHazardType')), migrations.AddField(model_name=
        'assessmenthazardcause', name='a_h_type_cause', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='ht_cause', to='bcn_rp.AssessmentHazardType')),
        migrations.AddField(model_name='assessmenthazardcause', name=
        'assessment', field=models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, to='bcn_rp.Assessment')), migrations.AddField(
        model_name='assessmentelementhazardimpact', name='a_h_type', field=
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentHazardType')), migrations.AddField(model_name=
        'assessmentelementhazardimpact', name='assessment', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.Assessment')), migrations.AddField(model_name=
        'assessmentelementhazardimpact', name='impact_type', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentElementImpactType')), migrations.AddField(
        model_name='assessmentelement', name='element', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.Element')), migrations.AddField(model_name='assessment',
        name='status', field=models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, to='bcn_rp.AssessmentStatus')), migrations.
        AddField(model_name='assessment', name='version', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentVersion')), migrations.AddField(model_name=
        'aedependencies', name='ae_dependent', field=models.ForeignKey(
        on_delete=django.db.models.deletion.CASCADE, related_name=
        'element_dependant', to='bcn_rp.AssessmentElement')), migrations.
        AddField(model_name='aedependencies', name='ae_origin', field=
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='element_origin', to='bcn_rp.AssessmentElement')),
        migrations.AddField(model_name='aedependencies', name=
        'dependency_type', field=models.ForeignKey(on_delete=django.db.
        models.deletion.CASCADE, to='bcn_rp.DependencyType'))]

from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):
    initial = True
    dependencies = []
    operations = [migrations.CreateModel(name='AEDependencies', fields=[(
        'id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('help_text', models.
        CharField(blank=True, max_length=100, null=True))], options={
        'abstract': False}), migrations.CreateModel(name='Assessment',
        fields=[('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('name', models.CharField(
        max_length=250, unique=True)), ('date_created', models.DateField(
        auto_now=True)), ('considerations', models.TextField()), (
        'organizational_score', models.DecimalField(decimal_places=2,
        default=0, max_digits=15)), ('physical_score', models.DecimalField(
        decimal_places=2, default=0, max_digits=15)), ('functional_score',
        models.DecimalField(decimal_places=2, default=0, max_digits=15))],
        options={'abstract': False}), migrations.CreateModel(name=
        'AssessmentElement', fields=[('id', models.AutoField(auto_created=
        True, primary_key=True, serialize=False, verbose_name='ID')), (
        'enabled', models.BooleanField(default=True)), ('assessment',
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.Assessment'))], options={'abstract': False}), migrations.
        CreateModel(name='AssessmentElementHazardImpact', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('a_element', models.ForeignKey(
        on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentElement'))], options={'abstract': False}),
        migrations.CreateModel(name='AssessmentElementImpactType', fields=[
        ('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('name', models.CharField(
        max_length=250, unique=True))], options={'abstract': False}),
        migrations.CreateModel(name='AssessmentHazardCause', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID'))], options={'abstract': False}),
        migrations.CreateModel(name='AssessmentHazardConsequence', fields=[
        ('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID'))], options={'abstract': False}),
        migrations.CreateModel(name='AssessmentHazardSubtype', fields=[(
        'id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('enabled', models.
        BooleanField(default=False))], options={'abstract': False}),
        migrations.CreateModel(name='AssessmentHazardType', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('risk_assessment', models.CharField(
        blank=True, max_length=50, null=True)), ('r_a_year', models.
        CharField(blank=True, max_length=50, null=True)), (
        'contingency_plan', models.CharField(blank=True, max_length=50,
        null=True)), ('c_p_year', models.CharField(blank=True, max_length=
        50, null=True)), ('subtypes', models.CharField(blank=True,
        max_length=250, null=True)), ('enabled', models.BooleanField(
        default=False)), ('assessment', models.ForeignKey(on_delete=django.
        db.models.deletion.CASCADE, to='bcn_rp.Assessment'))], options={
        'abstract': False}), migrations.CreateModel(name=
        'AssessmentQuestion', fields=[('id', models.AutoField(auto_created=
        True, primary_key=True, serialize=False, verbose_name='ID')), (
        'response', models.CharField(blank=True, max_length=500, null=True)
        ), ('assessment', models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, to='bcn_rp.Assessment')), ('assessment_element',
        models.ForeignKey(blank=True, null=True, on_delete=django.db.models
        .deletion.CASCADE, to='bcn_rp.AssessmentElement'))], options={
        'abstract': False}), migrations.CreateModel(name=
        'AssessmentStakeholder', fields=[('id', models.AutoField(
        auto_created=True, primary_key=True, serialize=False, verbose_name=
        'ID')), ('name', models.CharField(max_length=250, unique=True)), (
        'assessment', models.ForeignKey(on_delete=django.db.models.deletion
        .CASCADE, to='bcn_rp.Assessment')), ('element', models.ForeignKey(
        on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentElement'))], options={'abstract': False}),
        migrations.CreateModel(name='AssessmentStatus', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('name', models.CharField(max_length=
        250, unique=True))], options={'abstract': False}), migrations.
        CreateModel(name='AssessmentVersion', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('version', models.CharField(max_length=25)),
        ('name', models.CharField(blank=True, max_length=250, null=True)),
        ('description', models.TextField(blank=True, null=True)), (
        'date_released', models.DateField(default=django.utils.timezone.now
        ))], options={'abstract': False}), migrations.CreateModel(name=
        'DependencyType', fields=[('id', models.AutoField(auto_created=True,
        primary_key=True, serialize=False, verbose_name='ID')), ('name',
        models.CharField(max_length=250, unique=True))], options={
        'abstract': False}), migrations.CreateModel(name='Element', fields=
        [('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('code', models.CharField(
        max_length=20)), ('name', models.CharField(max_length=250)), (
        'note', models.CharField(blank=True, max_length=250, null=True)), (
        'address', models.CharField(blank=True, max_length=250, null=True)),
        ('order', models.IntegerField(blank=True, null=True)), ('parent',
        models.ForeignKey(blank=True, null=True, on_delete=django.db.models
        .deletion.CASCADE, to='bcn_rp.Element')), ('version', models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentVersion'))], options={'abstract': False}),
        migrations.CreateModel(name='HazardGroup', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('code', models.CharField(max_length=20,
        unique=True)), ('name', models.CharField(max_length=250)), ('note',
        models.CharField(blank=True, max_length=250, null=True)), (
        'address', models.CharField(blank=True, max_length=250, null=True))
        ], options={'abstract': False}), migrations.CreateModel(name=
        'HazardSubtype', fields=[('id', models.AutoField(auto_created=True,
        primary_key=True, serialize=False, verbose_name='ID')), ('code',
        models.CharField(max_length=20, unique=True)), ('name', models.
        CharField(max_length=250))], options={'abstract': False}),
        migrations.CreateModel(name='HazardSubtypeDetail', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('code', models.CharField(max_length=20,
        unique=True)), ('name', models.CharField(max_length=250)), (
        'hazard_subtype', models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, to='bcn_rp.HazardSubtype'))], options={'abstract':
        False}), migrations.CreateModel(name='HazardType', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('code', models.CharField(max_length=20,
        unique=True)), ('name', models.CharField(max_length=250)), (
        'description', models.CharField(blank=True, max_length=800, null=
        True)), ('hazard_group', models.ForeignKey(on_delete=django.db.
        models.deletion.CASCADE, to='bcn_rp.HazardGroup'))], options={
        'abstract': False}), migrations.CreateModel(name='MoVType', fields=
        [('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('name', models.CharField(
        max_length=250, unique=True))], options={'abstract': False}),
        migrations.CreateModel(name='QuestionSimple', fields=[('id', models
        .AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('question_short', models.CharField(blank=True,
        max_length=150, null=True)), ('question_long', models.CharField(
        blank=True, max_length=500, null=True)), ('help_text', models.
        CharField(blank=True, max_length=500, null=True)), ('placeholder',
        models.CharField(blank=True, max_length=250, null=True)), ('order',
        models.IntegerField(blank=True, null=True)), ('choices', models.
        CharField(blank=True, max_length=50, null=True)), ('multi', models.
        BooleanField(default=False)), ('question_type', models.CharField(
        blank=True, max_length=25, null=True)), ('version', models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentVersion'))], options={'abstract': False}),
        migrations.CreateModel(name='StakeholderElementRelationshipType',
        fields=[('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('name', models.CharField(
        max_length=250, unique=True))], options={'abstract': False}),
        migrations.CreateModel(name='StakeholderGroup', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('code', models.CharField(max_length=
        250, unique=True)), ('name', models.CharField(max_length=250)), (
        'description', models.CharField(blank=True, max_length=500, null=
        True))], options={'abstract': False}), migrations.CreateModel(name=
        'StakeholderLGRelationshipType', fields=[('id', models.AutoField(
        auto_created=True, primary_key=True, serialize=False, verbose_name=
        'ID')), ('name', models.CharField(max_length=250, unique=True))],
        options={'abstract': False}), migrations.CreateModel(name=
        'StakeholderType', fields=[('id', models.AutoField(auto_created=
        True, primary_key=True, serialize=False, verbose_name='ID')), (
        'code', models.CharField(max_length=250, unique=True)), ('name',
        models.CharField(max_length=250)), ('stakeholder_group', models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.StakeholderGroup'))], options={'abstract': False}),
        migrations.CreateModel(name='ValueType', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('name', models.CharField(max_length=250,
        unique=True))], options={'abstract': False}), migrations.AddField(
        model_name='hazardsubtype', name='hazard_type', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.HazardType')), migrations.AddField(model_name=
        'assessmentstakeholder', name='element_rel_type', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.StakeholderElementRelationshipType')), migrations.AddField(
        model_name='assessmentstakeholder', name='from_lg_rel_type', field=
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='from_lg_rel_type', to=
        'bcn_rp.StakeholderLGRelationshipType')), migrations.AddField(
        model_name='assessmentstakeholder', name='stakeholder_type', field=
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.StakeholderType')), migrations.AddField(model_name=
        'assessmentstakeholder', name='to_lg_rel_type', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='to_lg_rel_type', to=
        'bcn_rp.StakeholderLGRelationshipType')), migrations.AddField(
        model_name='assessmentquestion', name='mov_type', field=models.
        ForeignKey(blank=True, null=True, on_delete=django.db.models.
        deletion.CASCADE, to='bcn_rp.MoVType')), migrations.AddField(
        model_name='assessmentquestion', name='question', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.QuestionSimple')), migrations.AddField(model_name=
        'assessmenthazardtype', name='hazard_type', field=models.ForeignKey
        (on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.HazardType')), migrations.AddField(model_name=
        'assessmenthazardsubtype', name='a_h_type', field=models.ForeignKey
        (on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentHazardType')), migrations.AddField(model_name=
        'assessmenthazardsubtype', name='assessment', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.Assessment')), migrations.AddField(model_name=
        'assessmenthazardsubtype', name='h_subtype', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.HazardSubtype')), migrations.AddField(model_name=
        'assessmenthazardconsequence', name='a_h_type', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentHazardType')), migrations.AddField(model_name=
        'assessmenthazardconsequence', name='a_h_type_consequence', field=
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='ht_consequence', to='bcn_rp.AssessmentHazardType')),
        migrations.AddField(model_name='assessmenthazardconsequence', name=
        'assessment', field=models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, to='bcn_rp.Assessment')), migrations.AddField(
        model_name='assessmenthazardcause', name='a_h_type', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentHazardType')), migrations.AddField(model_name=
        'assessmenthazardcause', name='a_h_type_cause', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='ht_cause', to='bcn_rp.AssessmentHazardType')),
        migrations.AddField(model_name='assessmenthazardcause', name=
        'assessment', field=models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, to='bcn_rp.Assessment')), migrations.AddField(
        model_name='assessmentelementhazardimpact', name='a_h_type', field=
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentHazardType')), migrations.AddField(model_name=
        'assessmentelementhazardimpact', name='assessment', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.Assessment')), migrations.AddField(model_name=
        'assessmentelementhazardimpact', name='impact_type', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentElementImpactType')), migrations.AddField(
        model_name='assessmentelement', name='element', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.Element')), migrations.AddField(model_name='assessment',
        name='status', field=models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, to='bcn_rp.AssessmentStatus')), migrations.
        AddField(model_name='assessment', name='version', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'bcn_rp.AssessmentVersion')), migrations.AddField(model_name=
        'aedependencies', name='ae_dependent', field=models.ForeignKey(
        on_delete=django.db.models.deletion.CASCADE, related_name=
        'element_dependant', to='bcn_rp.AssessmentElement')), migrations.
        AddField(model_name='aedependencies', name='ae_origin', field=
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='element_origin', to='bcn_rp.AssessmentElement')),
        migrations.AddField(model_name='aedependencies', name=
        'dependency_type', field=models.ForeignKey(on_delete=django.db.
        models.deletion.CASCADE, to='bcn_rp.DependencyType'))]

# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-15 12:15
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AEDependencies',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('help_text', models.CharField(blank=True, max_length=100, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Assessment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
                ('date_created', models.DateField(auto_now=True)),
                ('considerations', models.TextField()),
                ('organizational_score', models.DecimalField(decimal_places=2, default=0, max_digits=15)),
                ('physical_score', models.DecimalField(decimal_places=2, default=0, max_digits=15)),
                ('functional_score', models.DecimalField(decimal_places=2, default=0, max_digits=15)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentElement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('enabled', models.BooleanField(default=True)),
                ('assessment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentElementHazardImpact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('a_element', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentElement')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentElementImpactType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentHazardCause',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentHazardConsequence',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentHazardSubtype',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('enabled', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentHazardType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('risk_assessment', models.CharField(blank=True, max_length=50, null=True)),
                ('r_a_year', models.CharField(blank=True, max_length=50, null=True)),
                ('contingency_plan', models.CharField(blank=True, max_length=50, null=True)),
                ('c_p_year', models.CharField(blank=True, max_length=50, null=True)),
                ('subtypes', models.CharField(blank=True, max_length=250, null=True)),
                ('enabled', models.BooleanField(default=False)),
                ('assessment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentQuestion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('response', models.CharField(blank=True, max_length=500, null=True)),
                ('assessment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment')),
                ('assessment_element', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentElement')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentStakeholder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
                ('assessment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment')),
                ('element', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentElement')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AssessmentVersion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('version', models.CharField(max_length=25)),
                ('name', models.CharField(blank=True, max_length=250, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('date_released', models.DateField(default=django.utils.timezone.now)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DependencyType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Element',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=20)),
                ('name', models.CharField(max_length=250)),
                ('note', models.CharField(blank=True, max_length=250, null=True)),
                ('address', models.CharField(blank=True, max_length=250, null=True)),
                ('order', models.IntegerField(blank=True, null=True)),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Element')),
                ('version', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentVersion')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HazardGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=20, unique=True)),
                ('name', models.CharField(max_length=250)),
                ('note', models.CharField(blank=True, max_length=250, null=True)),
                ('address', models.CharField(blank=True, max_length=250, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HazardSubtype',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=20, unique=True)),
                ('name', models.CharField(max_length=250)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HazardSubtypeDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=20, unique=True)),
                ('name', models.CharField(max_length=250)),
                ('hazard_subtype', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.HazardSubtype')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HazardType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=20, unique=True)),
                ('name', models.CharField(max_length=250)),
                ('description', models.CharField(blank=True, max_length=800, null=True)),
                ('hazard_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.HazardGroup')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MoVType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='QuestionSimple',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question_short', models.CharField(blank=True, max_length=150, null=True)),
                ('question_long', models.CharField(blank=True, max_length=500, null=True)),
                ('help_text', models.CharField(blank=True, max_length=500, null=True)),
                ('placeholder', models.CharField(blank=True, max_length=250, null=True)),
                ('order', models.IntegerField(blank=True, null=True)),
                ('choices', models.CharField(blank=True, max_length=50, null=True)),
                ('multi', models.BooleanField(default=False)),
                ('question_type', models.CharField(blank=True, max_length=25, null=True)),
                ('version', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentVersion')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='StakeholderElementRelationshipType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='StakeholderGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=250, unique=True)),
                ('name', models.CharField(max_length=250)),
                ('description', models.CharField(blank=True, max_length=500, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='StakeholderLGRelationshipType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='StakeholderType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=250, unique=True)),
                ('name', models.CharField(max_length=250)),
                ('stakeholder_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.StakeholderGroup')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ValueType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='hazardsubtype',
            name='hazard_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.HazardType'),
        ),
        migrations.AddField(
            model_name='assessmentstakeholder',
            name='element_rel_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.StakeholderElementRelationshipType'),
        ),
        migrations.AddField(
            model_name='assessmentstakeholder',
            name='from_lg_rel_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='from_lg_rel_type', to='bcn_rp.StakeholderLGRelationshipType'),
        ),
        migrations.AddField(
            model_name='assessmentstakeholder',
            name='stakeholder_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.StakeholderType'),
        ),
        migrations.AddField(
            model_name='assessmentstakeholder',
            name='to_lg_rel_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='to_lg_rel_type', to='bcn_rp.StakeholderLGRelationshipType'),
        ),
        migrations.AddField(
            model_name='assessmentquestion',
            name='mov_type',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.MoVType'),
        ),
        migrations.AddField(
            model_name='assessmentquestion',
            name='question',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.QuestionSimple'),
        ),
        migrations.AddField(
            model_name='assessmenthazardtype',
            name='hazard_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.HazardType'),
        ),
        migrations.AddField(
            model_name='assessmenthazardsubtype',
            name='a_h_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentHazardType'),
        ),
        migrations.AddField(
            model_name='assessmenthazardsubtype',
            name='assessment',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment'),
        ),
        migrations.AddField(
            model_name='assessmenthazardsubtype',
            name='h_subtype',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.HazardSubtype'),
        ),
        migrations.AddField(
            model_name='assessmenthazardconsequence',
            name='a_h_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentHazardType'),
        ),
        migrations.AddField(
            model_name='assessmenthazardconsequence',
            name='a_h_type_consequence',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ht_consequence', to='bcn_rp.AssessmentHazardType'),
        ),
        migrations.AddField(
            model_name='assessmenthazardconsequence',
            name='assessment',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment'),
        ),
        migrations.AddField(
            model_name='assessmenthazardcause',
            name='a_h_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentHazardType'),
        ),
        migrations.AddField(
            model_name='assessmenthazardcause',
            name='a_h_type_cause',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ht_cause', to='bcn_rp.AssessmentHazardType'),
        ),
        migrations.AddField(
            model_name='assessmenthazardcause',
            name='assessment',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment'),
        ),
        migrations.AddField(
            model_name='assessmentelementhazardimpact',
            name='a_h_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentHazardType'),
        ),
        migrations.AddField(
            model_name='assessmentelementhazardimpact',
            name='assessment',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Assessment'),
        ),
        migrations.AddField(
            model_name='assessmentelementhazardimpact',
            name='impact_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentElementImpactType'),
        ),
        migrations.AddField(
            model_name='assessmentelement',
            name='element',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.Element'),
        ),
        migrations.AddField(
            model_name='assessment',
            name='status',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentStatus'),
        ),
        migrations.AddField(
            model_name='assessment',
            name='version',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.AssessmentVersion'),
        ),
        migrations.AddField(
            model_name='aedependencies',
            name='ae_dependent',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='element_dependant', to='bcn_rp.AssessmentElement'),
        ),
        migrations.AddField(
            model_name='aedependencies',
            name='ae_origin',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='element_origin', to='bcn_rp.AssessmentElement'),
        ),
        migrations.AddField(
            model_name='aedependencies',
            name='dependency_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bcn_rp.DependencyType'),
        ),
    ]
