# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-03 12:20
from __future__ import unicode_literals

import django.contrib.postgres.fields
import django.contrib.postgres.fields.hstore
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
from django.contrib.postgres.operations import HStoreExtension


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        HStoreExtension(),
        migrations.CreateModel(
            name='DockerContainer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.CharField(max_length=50, validators=[django.core.validators.RegexValidator('(:[\\w][\\w.]{0,127}?)?')])),
                ('ports', django.contrib.postgres.fields.ArrayField(base_field=models.PositiveIntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(65535)]), blank=True, default=[], size=None)),
            ],
        ),
        migrations.CreateModel(
            name='MarackerApplication',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.SlugField(unique=True)),
                ('description', models.TextField(blank=True, default='no description available')),
                ('command', models.TextField(blank=True, default='')),
                ('vcs_url', models.URLField(blank=True, max_length=2000)),
                ('docker_container', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='marackerapi.DockerContainer')),
            ],
        ),
        migrations.CreateModel(
            name='MarathonConfig',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cpu', models.DecimalField(decimal_places=1, default=0.1, max_digits=3, validators=[django.core.validators.MinValueValidator(0.0)])),
                ('memory', models.PositiveIntegerField(default=32, validators=[django.core.validators.MinValueValidator(32)])),
                ('args', models.TextField(blank=True)),
                ('env_vars', django.contrib.postgres.fields.hstore.HStoreField(default={})),
                ('maracker_app', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='marackerapi.MarackerApplication')),
            ],
        ),
    ]
