# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2018-02-15 15:40
from __future__ import unicode_literals

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


class Migration(migrations.Migration):
    dependencies = [
        ("automated_logging", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="Application",
            fields=[
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4, primary_key=True, serialize=False
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("name", models.CharField(max_length=255)),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.RenameField(
            model_name="modelobject",
            old_name="application",
            new_name="type",
        ),
        migrations.RemoveField(
            model_name="modelobject",
            name="model",
        ),
        migrations.RemoveField(model_name="model", name="application"),
        migrations.AddField(
            model_name="model",
            name="application",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="atl_model_application",
                to="automated_logging.Application",
            ),
        ),
        migrations.RemoveField(model_name="request", name="application"),
        migrations.AddField(
            model_name="request",
            name="application",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to="automated_logging.Application",
            ),
        ),
    ]
