# Generated by Django 3.1.6 on 2021-04-15 13:25

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


class Migration(migrations.Migration):
    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("moonmining", "0002_add_mining_ledger"),
    ]

    operations = [
        migrations.AddField(
            model_name="miningledgerrecord",
            name="user",
            field=models.ForeignKey(
                default=None,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="mining_ledger",
                to=settings.AUTH_USER_MODEL,
            ),
        ),
        migrations.AddField(
            model_name="refinery",
            name="ledger_last_update_at",
            field=models.DateTimeField(
                default=None,
                help_text="last successful update of mining ledger",
                null=True,
            ),
        ),
        migrations.AddField(
            model_name="refinery",
            name="ledger_last_update_ok",
            field=models.BooleanField(
                default=None,
                help_text="True if the last update of the mining ledger was successful",
                null=True,
            ),
        ),
        migrations.CreateModel(
            name="EveOreTypeExtras",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "refined_price",
                    models.FloatField(
                        default=None,
                        help_text="price calculated as sum of prices for refined materials",
                        null=True,
                    ),
                ),
                (
                    "ore_type",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="extras",
                        to="moonmining.eveoretype",
                    ),
                ),
            ],
        ),
    ]
