# Generated by Django 3.1.5 on 2021-01-18 17:01

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


class Migration(migrations.Migration):

    dependencies = [
        ('myapi', '0010_auto_20210117_1936'),
    ]

    operations = [
        migrations.CreateModel(
            name='Price',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('shop', models.CharField(max_length=100)),
                ('price', models.IntegerField(default=None)),
            ],
        ),
        migrations.CreateModel(
            name='PriceRecording',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_time', models.CharField(default='dd.mm.yy hh:mm:ss', max_length=100)),
            ],
        ),
        migrations.RemoveField(
            model_name='product',
            name='description',
        ),
        migrations.RemoveField(
            model_name='product',
            name='name',
        ),
        migrations.AddField(
            model_name='product',
            name='title',
            field=models.CharField(default='N/A', max_length=500),
        ),
        migrations.AlterField(
            model_name='product',
            name='category',
            field=models.CharField(default='N/A', max_length=200),
        ),
        migrations.DeleteModel(
            name='PriceHistory',
        ),
        migrations.AddField(
            model_name='pricerecording',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='old_prices', to='myapi.product'),
        ),
        migrations.AddField(
            model_name='price',
            name='price_recording',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='price', to='myapi.pricerecording'),
        ),
        migrations.AddField(
            model_name='price',
            name='product',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='price', to='myapi.product'),
        ),
    ]
