# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2018-04-04 13:57
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('MainAPP', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='AdditionalCalculations',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Periodicity', models.PositiveSmallIntegerField(choices=[(0, 'With every new value'), (1, 'Every hour'), (2, 'Every day'), (3, 'Every week'), (4, 'Every month')], help_text='How often the calculation will be updated')),
                ('Calculation', models.PositiveSmallIntegerField(choices=[(0, 'Duty cycle OFF'), (1, 'Duty cycle ON'), (2, 'Mean value'), (3, 'Max value'), (4, 'Min value'), (5, 'Cummulative sum'), (6, 'Integral over time')])),
            ],
        ),
        migrations.AlterModelOptions(
            name='automationrules',
            options={'permissions': (('view_rules', 'Can see available automation rules'), ('activate_rules', 'Can change the state of the rules')), 'verbose_name': 'Automation rule', 'verbose_name_plural': 'Automation rules'},
        ),
        migrations.RenameField(
            model_name='ruleitems',
            old_name='order',
            new_name='Order',
        ),
        migrations.AddField(
            model_name='automationrules',
            name='LastEval',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='automationvariables',
            name='UserEditable',
            field=models.BooleanField(default=True),
        ),
        migrations.AlterField(
            model_name='ruleitems',
            name='Var2Hyst',
            field=models.FloatField(default=0.5),
        ),
        migrations.AddField(
            model_name='additionalcalculations',
            name='SinkVar',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='sinkvar', to='MainAPP.AutomationVariables'),
        ),
        migrations.AddField(
            model_name='additionalcalculations',
            name='SourceVar',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sourcevar', to='MainAPP.AutomationVariables'),
        ),
    ]
