# Generated by Django 2.2.16 on 2021-02-11 16:58

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


class Migration(migrations.Migration):

    dependencies = [
        ('bosscore', '0006_auto_20201002_2130'),
    ]

    operations = [
        migrations.CreateModel(
            name='ThrottleMetric',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mtype', models.CharField(choices=[('egress', 'Egress level'), ('ingress', 'Engress level'), ('compute', 'Computation level')], max_length=20)),
                ('units', models.CharField(choices=[('byte_count', 'Threshold in bytes'), ('cuboid_count', 'Threshold in cuboids'), ('voxel_count', 'Threshold in voxels')], max_length=20)),
                ('def_system_limit', models.BigIntegerField(default=-1)),
                ('def_api_limit', models.BigIntegerField(default=-1)),
                ('def_user_limit', models.BigIntegerField(default=-1)),
            ],
            options={
                'db_table': 'throttle_metric',
                'unique_together': {('mtype', 'units')},
            },
        ),
        migrations.CreateModel(
            name='ThrottleThreshold',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('limit', models.BigIntegerField(default=-1)),
                ('metric', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bosscore.ThrottleMetric')),
            ],
            options={
                'db_table': 'throttle_threshold',
                'unique_together': {('name', 'metric')},
            },
        ),
        migrations.CreateModel(
            name='ThrottleUsage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.BigIntegerField(default=0)),
                ('since', models.DateField(default=datetime.date.today)),
                ('threshold', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='bosscore.ThrottleThreshold')),
            ],
            options={
                'db_table': 'throttle_usage',
            },
        ),
    ]

# Generated by Django 2.2.16 on 2021-02-11 16:58

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


class Migration(migrations.Migration):

    dependencies = [
        ('bosscore', '0006_auto_20201002_2130'),
    ]

    operations = [
        migrations.CreateModel(
            name='ThrottleMetric',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mtype', models.CharField(choices=[('egress', 'Egress level'), ('ingress', 'Engress level'), ('compute', 'Computation level')], max_length=20)),
                ('units', models.CharField(choices=[('byte_count', 'Threshold in bytes'), ('cuboid_count', 'Threshold in cuboids'), ('voxel_count', 'Threshold in voxels')], max_length=20)),
                ('def_system_limit', models.BigIntegerField(default=-1)),
                ('def_api_limit', models.BigIntegerField(default=-1)),
                ('def_user_limit', models.BigIntegerField(default=-1)),
            ],
            options={
                'db_table': 'throttle_metric',
                'unique_together': {('mtype', 'units')},
            },
        ),
        migrations.CreateModel(
            name='ThrottleThreshold',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('limit', models.BigIntegerField(default=-1)),
                ('metric', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bosscore.ThrottleMetric')),
            ],
            options={
                'db_table': 'throttle_threshold',
                'unique_together': {('name', 'metric')},
            },
        ),
        migrations.CreateModel(
            name='ThrottleUsage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.BigIntegerField(default=0)),
                ('since', models.DateField(default=datetime.date.today)),
                ('threshold', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='bosscore.ThrottleThreshold')),
            ],
            options={
                'db_table': 'throttle_usage',
            },
        ),
    ]

# Generated by Django 2.2.16 on 2021-02-11 16:58